Hi all,
I have an arrow-shaped null which I'm trying to orient to be along the axis between two animated objects' center-points.
I've currently got it using the objects' kine.global.pos with the midpoint formula to stay between them, but have no clue what the math is for orientation.
Any help would be greatly appreciated, as I'm not quite sure what terms to google for a useful formula..
Thanks in advance!
Working with and matching Orientation constraints
-
NightroadAX
- Posts: 19
- Joined: 16 Nov 2010, 03:23
-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: Working with and matching Orientation constraints
Well you need to construct a rotation. This rotation needs to be constructed using vectors (directions in this case). You should try to find some information on how to construct a 3x3 or 4x4 matrix from 3D vectors. For the 4x4 matrix you already have the last vector for position in that you have the mid point.
I'll let you search around a bit (there are a few tutorials out there on how to do this in softimage already). If you're still stuck after a few days post back with some links that you checked out and some screen shots of what you've tried so far and I'll help you a bit more.
I'll let you search around a bit (there are a few tutorials out there on how to do this in softimage already). If you're still stuck after a few days post back with some links that you checked out and some screen shots of what you've tried so far and I'll help you a bit more.
-
dwigfor
- Posts: 395
- Joined: 17 Nov 2009, 16:46
Re: Working with and matching Orientation constraints
Does "Direction to Rotation" accomplish what you want? Essentially, it's a LookAt function.
-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: Working with and matching Orientation constraints
I think it would be best to skip the automatic nodes and actually dig a bit and be able to have some quality information come out of a thread rather than just pointing to something that is just there and works. The knowledge of how to construct a rotation from vectors is so useful in various situations.