Working with and matching Orientation constraints

Discussions about SOFTIMAGEs© Interactive Creative Environment©
NightroadAX
Posts: 19
Joined: 16 Nov 2010, 03:23

Working with and matching Orientation constraints

Post by NightroadAX » 06 Oct 2013, 02:30

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!

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: Working with and matching Orientation constraints

Post by EricTRocks » 06 Oct 2013, 15:45

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.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

User avatar
dwigfor
Posts: 395
Joined: 17 Nov 2009, 16:46

Re: Working with and matching Orientation constraints

Post by dwigfor » 07 Oct 2013, 22:16

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

Post by EricTRocks » 08 Oct 2013, 00:31

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.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken