Page 1 of 1

rotate scene node

Posted: Wed Jun 08, 2011 12:25 pm
by Varn1807
How can i make an animation to rotate a scene node for 180 degrees and then stop.
Is there a specific function?
Because CreateRotationAnimator it rotates it non-stop. I want it to stop after it rotates 180 degrees.

Thanks

Posted: Wed Jun 08, 2011 1:22 pm
by CuteAlien
Doesn't seem to be supported so far. So you have to write your own animator for that.

Posted: Thu Jun 09, 2011 5:58 am
by Varn1807
and may i ask some ideeas how to do that??

Posted: Thu Jun 09, 2011 6:10 am
by Sylence
I would take the source of the RotationAnimator as a start point. Then simply add a check if the rotation is 180 degrees and from there on stop any further rotation.

Posted: Fri Jun 10, 2011 6:21 am
by Varn1807
thanks for the advice I have done it :)
now for another question( i'm sorry if i'm asking too many questions ), i don't need any code I only need ideas.
for example how do you make a scene node appeear , it does it's animation, then another one appears, it does it's animation and so on.
I don't want all of them to appear at the same time and do their animations, I want them to appear in an order.
Thanks

Posted: Fri Jun 10, 2011 6:26 am
by serengeor
Varn1807 wrote:thanks for the advice I have done it :)
now for another question( i'm sorry if i'm asking too many questions ), i don't need any code I only need ideas.
for example how do you make a scene node appeear , it does it's animation, then another one appears, it does it's animation and so on.
I don't want all of them to appear at the same time and do their animations, I want them to appear in an order.
Thanks
You might need another layer for logic to do this and do the things exactly as you said yourself.

Posted: Fri Jun 10, 2011 7:15 am
by Varn1807
have no idea about layers :| can you explain a bit

Posted: Fri Jun 10, 2011 8:27 am
by serengeor
Varn1807 wrote:have no idea about layers :| can you explain a bit
I mean on top of irrlicht framework that would do what you want. It might be some Object classes that hold nodes and manipulates them the way you need. Also a manager for those object would be nice (Like scene manager irn irrlicht). It's up to you to design it.

Re: rotate scene node

Posted: Thu Sep 01, 2011 3:55 pm
by brick
I have a somewhat similar question. Nodes that I have created can be moved by WASD keys. I want them to face the direction in which they're moving. Say, if they're facing east, I want them to instantly turn west when I push A. However, I just can't seem to find a way to turn the ndoes. There's a rotation animator, but that's not what I want. I just need the node to instantly turn around. Is there a method which takes the angle of rotation as a parameter, and then instantly performs rotation?

Re: rotate scene node

Posted: Thu Sep 01, 2011 11:04 pm
by hybrid
Maybe go throught the examples first. They have a purpose: Learning the basics of Irrlicht. Anyway, check the scene node API. There's also rotation and movement without animators.

Re: rotate scene node

Posted: Fri Sep 02, 2011 2:04 pm
by brick
You're right, thanks. I've found a way to rotate it successfully.