Control The Hand of Robot with another joint

hello everybody,

i have a problem when rigging the robot and make animation with this.

I have 2 joints JT1, JT2 and H1 and H2 joints to control the Hand of Robot. But i wonder that can i moving the H1 and H2 so JT1 and JT2 will automatic rotate the angle to match with H1 and H2?

I have a video and picture, please give me an idea if you have. Thank you so much.



2024-10-20 22-32-02.mkv