Rotation not affecting the node?

Problems building or running the engine, queries about how to use features etc.
Post Reply
lucky7456969
Gremlin
Posts: 156
Joined: Tue Sep 18, 2012 3:43 am

Rotation not affecting the node?

Post by lucky7456969 »

No matter how I twist the node, the node remains at its axis-aligned position.
Why is that?
Thanks
Jack

Code: Select all

Entity* mYourEntity = mSceneMgr->createEntity("test", "cb.mesh");
mSceneMgr->getRootSceneNode()->createChildSceneNode("test")->attachObject(mYourEntity );
mSceneMgr->getSceneNode("test")->setScale(0.01f,0.01f,0.01f);
mSceneMgr->getSceneNode("test")->setPosition(-60.0f, 50.0f, -20.0f);

	 
mSceneMgr->getSceneNode("test")->yaw(Ogre::Radian(30.0f));
mSceneMgr->getSceneNode("test")->pitch(Ogre::Radian(30.0f));
mSceneMgr->getSceneNode("test")->roll(Ogre::Radian(30.0f));
User avatar
mmixLinus
Silver Sponsor
Silver Sponsor
Posts: 199
Joined: Thu Apr 21, 2011 3:08 pm
Location: Lund, Sweden
x 12
Contact:

Re: Rotation not affecting the node?

Post by mmixLinus »

.. and does it scale & move?
Powered by Ogre3D:
MMiX.Me 3D - 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
YouTube|Facebook
User avatar
paul424
Gnome
Posts: 314
Joined: Thu May 24, 2012 7:16 pm
x 13

Re: Rotation not affecting the node?

Post by paul424 »

Dude, watch in what Unit you do your "rotations" :) . Cannot easily calculate the value ... however when in radians you set your angle value from 0 ... 2Pi ... hmm ...
Did you mean Ogre::Degrees ?
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Rotation not affecting the node?

Post by Kojack »

Yep, Radian(30.0f) is 1718 degrees.
Although that shouldn't stop it from at least rotating to some random looking orientation.
(Unless a yaw, pitch and roll each of 1718 degrees ends up looking just like the original orientation, which is unlikely but possible)
Post Reply