Hi
Im new here, just buliding a small game about ships and sea and two problems at the moment, some help be really apreciated.
I have a terrainoctree and a ship model (an MD2 file I made of a ship)
1- when I rotate the ship it rotate with the axis of rotation in the top of the model, inestead of rotating in the middle of the ship, so the movement is a bit strange, I dont know if thats a problem with the md2 or with the code, I suppose each model should have a center and I dont know where to set it, if in Blender or in the irrlicht code.
2- When I press a key, the response is really slow, it moves rotates etc, but it takes a second or half a second until it starts moving, Im just using the code form the tutorial Movement, and the fps are quite high, 300+ so I dont know why is that slowness...
Im not english native speaker so pardon me for any mistake and thanks
Rotate MD2 and keyboard response slow
-
- Posts: 360
- Joined: Tue Feb 10, 2004 2:20 am
- Location: Lubbock, TX
Re: Rotate MD2 and keyboard response slow
Hi,
For question 1: You need to change the model's pivot point in your 3d application that it came out of. Irricht considers the models pivot as the center of its world so everything will happen from the pivot point: roatation movements etc.
For question 2: I would not recommend searching the forum for a post that is quite old by keless that explains how to do keyboard input smoothly. It is very good and has worked quite well for me as well as others.
For question 1: You need to change the model's pivot point in your 3d application that it came out of. Irricht considers the models pivot as the center of its world so everything will happen from the pivot point: roatation movements etc.
For question 2: I would not recommend searching the forum for a post that is quite old by keless that explains how to do keyboard input smoothly. It is very good and has worked quite well for me as well as others.
ok, I changed the pivot point in blender and re-export it and it worked.
Also I read that post, now the movement is really smoother, but another problem raises, the movement is way too much fast than before... I suppose that the movement is attached to the fps (as the acting code is now in the main loop section) so in SDL there is an SDL delay to limit the fps, how can i achieve that in irrlicht?
Any irr:delay
Thx again for the replys
Also I read that post, now the movement is really smoother, but another problem raises, the movement is way too much fast than before... I suppose that the movement is attached to the fps (as the acting code is now in the main loop section) so in SDL there is an SDL delay to limit the fps, how can i achieve that in irrlicht?
Any irr:delay
Thx again for the replys
-
- Posts: 360
- Joined: Tue Feb 10, 2004 2:20 am
- Location: Lubbock, TX