Make the Node turn not rotate?
Make the Node turn not rotate?
How does one turn an object around one axis? The setRotation() seems to move the object in a circle. I would like the object to turn 45%.
Thanks in advance!!
Thanks in advance!!
rotation() makes the object turn around its own point of origin.
If that point of origin is directly at the center of the object, then it will only 'turn' to use your wording. However, if that point of origin is somewhere other than the center, the object will 'seem to move in a circle' where the center of that circle is the point of origin.
If you are calling rotate on a model, you need to make sure you know where that model's origin is-- you are assuming it is at the center of the model, and apparently it is not.
If that point of origin is directly at the center of the object, then it will only 'turn' to use your wording. However, if that point of origin is somewhere other than the center, the object will 'seem to move in a circle' where the center of that circle is the point of origin.
If you are calling rotate on a model, you need to make sure you know where that model's origin is-- you are assuming it is at the center of the model, and apparently it is not.
a screen cap is worth 0x100000 DWORDS
I am also trying to do this. I have tried the below call but none of the seem to work correctly.
//I have also tried geting the position of my node and then using the rotateBy commands and they do the same this as above.
Please help
also sorry for the tripple post above I do not know what happend[/code]
Code: Select all
myNode->setRotation(core::vector3df(0,0,0.2f));
//moves the object down once but then does not do anything else
myNode->setRotation( myNode->getRotation()+ core::vector3df(0,0,-0.2f));
//This code rotates the object around some point that is no where near my scene
Please help
also sorry for the tripple post above I do not know what happend[/code]
You'll have to take a look at the 3d model while in your 3d modelling software (Milkshape, 3ds max, etc.). When you open the model you will be able to tell if its polygons are truly at the model's origin (0,0,0) or if the polygons are shifted a certain distance away. Its pretty common to open or import a particular model and find that the polygons are not centered about the origin. Its kind of hard for me to explain, so just take a look at the model inside of your modelling software.
look here niko shows how to use a transparent light
http://irrlicht.sourceforge.net/tut008.html
http://irrlicht.sourceforge.net/tut008.html