Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Posts: 339 Joined: Fri May 23, 2025 5:04 pm
x 24
Post
by slapin » Wed Nov 26, 2025 8:10 am
Hi, all!
I have vertical vector
Code: Select all
Ogre::Vector3 vertical = node->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y;
I need to calculate torque which will make vertical == Ogre::Vector3::UNIT_Y true or close;
how can I do it and what helpers I have to use? I thiink angular velocity will be OK too.
chilly willy
Halfling
Posts: 75 Joined: Tue Jun 02, 2020 4:11 am
x 22
Post
by chilly willy » Fri Nov 28, 2025 9:46 am
If (big if) I understand correctly, you're looking for this:
Code: Select all
vertical.getRotationTo(Ogre::Vector3::UNIT_Y);
which in this case should give you the same value as
Code: Select all
node->_getDerivedOrientation().Inverse()
slapin
Bronze Sponsor
Posts: 339 Joined: Fri May 23, 2025 5:04 pm
x 24
Post
by slapin » Fri Nov 28, 2025 11:28 am
Yes, that is perfect, thanks!