Dumb math question about torque Topic is solved

Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Bronze Sponsor
Posts: 339
Joined: Fri May 23, 2025 5:04 pm
x 24

Dumb math question about torque

Post by slapin »

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

Re: Dumb math question about torque

Post by chilly willy »

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
Bronze Sponsor
Posts: 339
Joined: Fri May 23, 2025 5:04 pm
x 24

Re: Dumb math question about torque

Post by slapin »

Yes, that is perfect, thanks!