Very Simple Question!!!

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.
Post Reply
Munku
Posts: 66
Joined: Tue Nov 30, 2004 4:04 pm

Very Simple Question!!!

Post by Munku »

How can I turn a mesh to face another direction while staying still? When I use setRotation the mesh just goes in a (wide) circle.
Umm, don't look at me that way. I'M not the dead one here.

--The One True Marshmellow
WalterWzK
Posts: 72
Joined: Wed Jan 12, 2005 2:57 pm
Location: Netherlands
Contact:

Post by WalterWzK »

That means ur mesh is not designed around the correct middle of the model.

So bringing it closer or exactly at the middle of the axises there are will solve the problem as it rotates closer around. That means a smaller circle and eventually no circle, wich means it could rotate around his exact center.

good luck, I hope I've helped you.
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Munku
Posts: 66
Joined: Tue Nov 30, 2004 4:04 pm

*grin*

Post by Munku »

So, how do I do that?
Umm, don't look at me that way. I'M not the dead one here.

--The One True Marshmellow
WalterWzK
Posts: 72
Joined: Wed Jan 12, 2005 2:57 pm
Location: Netherlands
Contact:

Post by WalterWzK »

Well open the mesh in the application you've used to design it, like milkshape etc.. and then move it towards the three lines in the middle of the field as close as you can.
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Munku
Posts: 66
Joined: Tue Nov 30, 2004 4:04 pm

Ahh,

Post by Munku »

I thought you meant in-code
Umm, don't look at me that way. I'M not the dead one here.

--The One True Marshmellow
WalterWzK
Posts: 72
Joined: Wed Jan 12, 2005 2:57 pm
Location: Netherlands
Contact:

Post by WalterWzK »

Nope :p... its an boundingbox problem so maybe you can alter those value's within irrlicht but why add extra code when it can be solved much easier.

So lets say this is you object:

__________
|..............|
|./............|
|......o......|
|..............|
|_________|

where the "\" is ur mesh and the "o" is the center, and the box is... the boundingbox :P Than there would occur a much bigger rotation-circle as in the following situtation:
________
|..........|
|....\.....|
|______|

Where your mesh is almost the center itself

Note that the dots "." are just there to keep it a box cuz the forum deletes every space that is typed behind a space. And posting a bitmap is too much work :P But im sure you'll get it mate!
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

putting things in the code UBB tags, makes it fixed spacing, and takes spaces into account...for the future ;)

Code: Select all

/-----\
|     |
|  o  |
|     |
\-----/
WalterWzK
Posts: 72
Joined: Wed Jan 12, 2005 2:57 pm
Location: Netherlands
Contact:

Post by WalterWzK »

Nice box you got there :lol:

Ill keep it in mind!
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Post Reply