Simnple Math Question

Community Forums/General Help/Simnple Math Question

Baystep Productions(Posted 2010) [#1]
Hi. I need help with a math function...

I have a bone, with a joint in the center and one at X distance below (lets say 10 for simplicity). When I rotate the first joint how to I find the new position of the second one.

In context this is for a 2D game in which I have an character arm that aims in 360 and I need to attach the gun to it's hand.


H&K(Posted 2010) [#2]
Centre of rotationy + 10* Sin (angel)
Centre of rotationx + 10 * Cos (angel)

You need to mess around depending on where you really want 0Degrees to be, and where you want + - direction etc

Last edited 2010


Baystep Productions(Posted 2010) [#3]
Hmmm. Ok.
Exactly what do you mean by centre of rotation?


H&K(Posted 2010) [#4]
a joint in the center