View Full Version : aimConstraint mathematics?

10 October 2007, 04:22 PM
does anyone know the mathematics of the aim constraint?

i need to compute an euler angle with given vectors. i played with the angleBetween command with success but not perfect results

any ideas?

10 October 2007, 09:19 PM
There's some C code here:

as well as a description here that is pretty good:

For python examples, you can look inside the mat3 or mat4 classes of the cgkit:

I find it is a great resource for matrix/vector math guidance, although not entirely straightforward since it is part of a much larger system.

Then there's the hacky way...
Load your vectors into an aim constraint, or load the decomposeMatrix plugin and put them into that, then read the results and delete the node. :)

10 October 2007, 09:05 AM
oh thx for all these docs :) i'll keep that somewhere in a corner. looks interesting!
finally i used a aimConstraint node as you said, i don't delete it but it is heavily solicited with some particle expressions :p

CGTalk Moderation
10 October 2007, 09:05 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.