Turn to target in 3D

A forum to store posts deemed exceptionally wise and useful
Psan
Posts: 16
Joined: Sun Oct 04, 2009 7:07 pm

Post by Psan »

Thank you arras,

Your code works great, it saved me a lot of time. I used it to make limbs of a character always fall towards the ground. I have given you full credit in the source. :)
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

I am glad it it helped you :)
Did you use joint node to affect those limbs? Or were they separate nodes?
Psan
Posts: 16
Joined: Sun Oct 04, 2009 7:07 pm

Post by Psan »

They are separate nodes in a parenting chain. Pelvis being the grand parent of all. I've avoided skinned mesh so far. The target is placed far below the ground like at (0,-10000,0).

Actually, the best solution for this would be to use a physics engine, but right now I feel too lazy to explore that, and your code is only 3-4 lines in the main loop, giving the same effect.
Post Reply