How to make a model around the center of rotation of its own

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
tswtn
Posts: 2
Joined: Fri Oct 19, 2007 1:55 am

How to make a model around the center of rotation of its own

Post by tswtn »

hello,everyone:
i have a trouble-the topic, i hope who one can help me out.
thank you!

i draw a wheel and want it to ratote around its axis, because i want to the whole car can run just look like. in opengl ,the function glRotatef(angle, 0, 0, 1) can do so, but how to do in irrlicht engine?
who can help me , thanks a lot. :cry:
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

have a look at the examples and docs.

maybe you want something like:

node->setRotation (core::vector3df(angle, 0, 0) );
tswtn
Posts: 2
Joined: Fri Oct 19, 2007 1:55 am

Post by tswtn »

i did it as what you said ,but it failed.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

can you be a little more clear on what you want, want you are doing

and maybe post some code.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

tswtn wrote:i did it as what you said ,but it failed.
Failed how? It crashed your program? The wheel didn't rotate at all? It rotated in an unexpected way?

It is the correct method, assuming that you have a wheel that's in its own node, and that its axis of rotation is through the X axis. If it's not, you'll have to tell us more about your problem.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply