how to rotate well Bullet?

Discussion about everything. New games, 3d math, development tips...
Post Reply
Toby
Posts: 4
Joined: Sat Aug 20, 2005 9:30 am
Location: Caen
Contact:

how to rotate well Bullet?

Post by Toby »

Hello, I am a rookie with irrlitch and I make a simple fps game.
I managed to do menu, network interface... But I want to improve my game by adding bullet when we shoot. then I make bullet with Blender and I load it in the gam but when I start paint it (after a shot) rotation seems bad. Do not appear in the direction of the camera but always in the same.
How to correct it??
I have the position and the direction of the camera and I know how to make a rotation on a animatedSceneNode.

Thanks.
Nerexis
Posts: 27
Joined: Sun Dec 09, 2007 4:18 pm

Post by Nerexis »

I have same problem. Cant set bullet rotation of the camera but i have position.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What you want to do i guess is make it face in the direction that it's heading, there's been lots of discussions of making scene nodes face another scene node or a certain target, much like the camera has a setTarget function so if you search the forum you should find the answers.

Using a model of a bullet is a bit over the top though i would think... i just used a billboard in my FPS project and therefore didn't need to worry about rotating it as it would always face the camera.

So when the player fired a bullet it would be rendered with a billboard textured with an image of the back end of a bullet and if one of the enemies fired a bullet it would be textured with an image of the front end of a bullet.
Image Image Image
Post Reply