Help - Object animation one time?

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Ghostlight
Posts: 3
Joined: Wed Jun 27, 2007 10:29 am
Location: Germany
Contact:

Help - Object animation one time?

Post by Ghostlight »

Hello - I need a little help for irrlicht.Net!

I would like to anim a object one time, if the user click the object with the mouse. (That`s not the problem) But the object shall rotate at 45 degree and then stopping. Also, i must know that the anim is stopt.


Thanks for help and answers!
Irme
Posts: 55
Joined: Sat Jul 16, 2005 8:24 am

Post by Irme »

Sounds like the easiest way for you to accomplish this, is to use the iSceneNode.Rotation method. just make a loop increasing your rotation until it is 45. that way it will actually turn on screen.

Something like this:

Code: Select all

for I = 1 to 45
    node.rotation(new vector3d(i,0,0))
next
You could always just have that rotation done in your model's animation as well, but this will be easier IMO.
Ghostlight
Posts: 3
Joined: Wed Jun 27, 2007 10:29 am
Location: Germany
Contact:

Post by Ghostlight »

Thanks, that works. Now i have a little more work with the right fps-timing, but's ok. (maybe that solution was to easy, so i haven't seen it :roll: ) - By the way, animated meshes are slower as "normal", so i take it without anim.
Locked