Re: [osg-users] Orient a node to face another

2019-10-09 Thread Paul Leopard
Hi, Sorry for the delay ... That worked perfectly Thank you! Cheers, Paul things are more like they are now than they have ever been before -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76814#76814

Re: [osg-users] Orient a node to face another

2019-10-02 Thread Trajce Nikolov NICK
Hi Paul, you subtract the two input vectors and by this you get the direction from one to the other, then normalize and make the Quaternion to rotate the axis (in the code bellow is Y-forward) to the normalized vector. Something like this: osg::Quat GetRotation(const osg::Vec3& tgtPos, const

[osg-users] Orient a node to face another

2019-10-02 Thread Paul Leopard
Hi, What would be the best approach to solve the following problem where I need one node to be updated through a callback to face another node? I understand how to get a node to face the screen with a billboard but that's not the problem here... Here is the problem: I've got a satellite