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.
paradoximo
Posts: 18 Joined: Sun Jan 24, 2010 6:13 pm
Post
by paradoximo » Thu Nov 04, 2010 5:56 pm
Hi
I have a simple question.
How to write a rotating 3d model and set speed of that "rotating animation". I think i don't have to make that animation in modeler :/.
I think about rotating animation with car chosing.Is here anyone who did never see a car changer in racing game?
Murloc992
Posts: 272 Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania
Post
by Murloc992 » Thu Nov 04, 2010 6:55 pm
How about:
Code: Select all
ISceneNodeAnimator* ani=smgr->createRotationAnimator(vector3df(0,1,0));
carNode->addAnimator(ani);
ani->drop();
It will rotate your car node on Y axis, and it must be what you want. Also you can tweak the speed or the rotation direction.
paradoximo
Posts: 18 Joined: Sun Jan 24, 2010 6:13 pm
Post
by paradoximo » Thu Nov 04, 2010 8:22 pm
Thanx for reply
your code lines seems to be good but i tried to paste them and when i compiled it the program did and error in console and crashed.
BTW I'm editing a "Hello World" demo
and your "CarNode" is just node from line
IAnimatedMeshSceneNode* node = smgr -> addAnimatedMeshSceneNode( mesh ); //mesh is model of car
Any suggestions / help
?
Btw i can upload a code if you want
hybrid
Admin
Posts: 14143 Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:
Post
by hybrid » Fri Nov 05, 2010 9:08 am
Since this is only a trivial example, you should post the code in code tags directly in the forum. Moreover, you have to check the console output. Probably either your dll was not found, or the mesh was not found.
paradoximo
Posts: 18 Joined: Sun Jan 24, 2010 6:13 pm
Post
by paradoximo » Fri Nov 05, 2010 9:52 am
hybrid: I know it's just trivial example
Application works but crashes with errors like "x458478476 x868576857 x6978987956" and quits with message to sending a problem to microsoft base x].
I know where to put every line from Murloc992's but i doesn't work well anyway.
CuteAlien
Admin
Posts: 9852 Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:
Post
by CuteAlien » Fri Nov 05, 2010 10:06 am
Well, as hybrid mentioned - we really need to see the code to help.