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.
afecelis
Admin
Posts: 3075 Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:
Post
by afecelis » Mon May 31, 2004 2:30 am
Hi guys!
Is there an animator to make a 3d model spin 360 degrees in the "Y" axis?
how would that be done? I want a model to show up as a projected hologram rotating in a loop.
thnx!
saigumi
Posts: 921 Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:
Post
by saigumi » Mon May 31, 2004 3:49 am
Crud, how do I do this again?
afecelis
Admin
Posts: 3075 Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:
Post
by afecelis » Mon May 31, 2004 4:22 am
Thnx Saigumi. I tried and tried and tried using the API before but without success. Remember I'm not a programmer. That's why I brough it up here, to try it thru an example. I'm more like a code vampire.
If you may post some example code on how to declare the animator and then attach it to a 3d model node would be lovely.
thanks!!!
r2d2
Posts: 211 Joined: Mon Nov 24, 2003 5:22 pm
Post
by r2d2 » Mon May 31, 2004 8:31 am
Code: Select all
scene::ISceneNodeAnimator *anim2 = smgr->createRotationAnimator(core::vector3df(0, 1, 0));
mnode->addAnimator(anim2);
anim2->drop();
mnode is the node of the object you want to rotate
core::vector3df is the axis and the speed it should turn around it
afecelis
Admin
Posts: 3075 Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:
Post
by afecelis » Mon May 31, 2004 12:52 pm
thnx again r2! gonna try it now!
afecelis
Admin
Posts: 3075 Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:
Post
by afecelis » Mon May 31, 2004 1:02 pm
whoohooo!!!
that did it!
Man it was the simplest way. I was complicating things up. Where do you set the speed of rotation? If I place it wrong it gives me an error that the animator doesn't work with 2 values.
cheers!
r2d2
Posts: 211 Joined: Mon Nov 24, 2003 5:22 pm
Post
by r2d2 » Mon May 31, 2004 2:00 pm
core::vector3df is the axis and the speed it should turn around