Rotate the elbow out of a virtual body, or, rotate a point on the edge of an umbrella cap out of the water

Alexees

New member
Joined
Mar 10, 2020
Messages
1
Hi there,
I need to calculate something but I do not know how. I have the following situation:
Given a hand and shoulder position in 3D space, I need to calculate the position of the elbow. I'm using trigonometry to achieve this. The elbow always tries to point downwards.
The issue comes in when the hand gets close the body, in which case the elbow sticks into that body1583826445958.png. I need to calculate how to keep it out.

Since upper and lower arm need to stay the same length, the only way I found to think about this is to rotate the position where the elbow needs to go about the vector from shoulder to hand until outside of an imaginary vertical plane that sits on the shoulder. This way a 360 degree rotated elbow would describe a perfect disc. Now that disk will eventually cut through the imaginary plane. I'm interested in the end points of that intersection. In the end I'm interested in the angle by which I need to rotate the elbow about

Putting the problem another way. Think of an umbrella you ducked into water. On the umbrellas cap you have a marker on the outer rim which is now under water.
Whats the angle you need to rotate the umbrella's handle to surface that marker?

You might be recognizing the images as being screenshots from Unity. As such, I prefer simplified logic so I can leverage math functions instead of doing a full calculation in math terms. I'm not the best in math you know ;)
1583827175484.png
 
Last edited:
Top