CustomSceneNode Turning to center

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
idrose1025
Posts: 17
Joined: Mon May 08, 2006 8:58 am

CustomSceneNode Turning to center

Post by idrose1025 »

CustomSceneNode Turning to center

hi

I am a student who is studying irrlicht.

It is question about turning of position that I want.

See image.
stop image
1.http://pds4.egloos.com/pds/200701/25/56 ... 010974.jpg
node->setRotation(45); 1 -> 2
2.http://pds5.egloos.com/pds/200701/25/56 ... 012916.jpg
Position that I want to rotate! 1 -> 3
3.http://pds5.egloos.com/pds/200701/25/56 ... 014957.jpg

Want to rotate to center that is marked in 3 times image.

Want to rotate to indication position .

Thank you for reading writing .
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

the easyest way is to make center of your four rectangles node to be its origin. This can be done in diferent ways depending howe you made your node.

If it is for some reason unpossible than you gona have some hard time making some calculations involving vectors and trigonometry. If you are skiled in mathematics than you may want to use matrices as well. Look at vector2d and matrix4 classes since they have some useful functions you may use.
Post Reply