Shooting a rocket model

Hi,

I am using a mouse-look style camera and movement system. I am using 2 vectors; one for my current location and for the direction that i’m facing. I can fire rockets (which are spheres at the moment) in whatever direction I’m facing.

The problem is I would like to fire an MD2 model of a rocket instead of the sphere. I can fire the model and it travels in whatever direction I shoot it, but I can’t seem to figure out how to make the front of the rocket model always point forward. The rocket is pointing out into the negative z direction, so if i turn around and shoot, the rocket will fire sidewards or with the front pointing towards me (ie backwards!).

How can i solve this problem (ie the front end of the rocket should point in whatever direction i’m firing), my 3D maths aint that great!

you could rotate your rocket to match your camera. or use a lookAt of the rockets transform3d.

if u want to lock onto an object then fire your rocket and it swings around in space to the target u locked. lookAt is good for this. then mess around with interpolation.

so the target is point 0, another node thats half way between your target and the rocket location with a random offset is point 1, and the rocket is point 2. now get the rocket to always togo point 1. and get point 1 to goto point 2. and u have a nice swinging rocket in space. add abit of juggle to point 1 and some springing. and u have the working of something thats working great! :slight_smile:

goo luck- im doing rockets next.

Cool…

Thanks for the advice I’ll give it a go…