Game Development Community

Problems with mounting objects with rotation

by Scott Wilson-Billing · in iTorque 2D · 05/05/2010 (2:01 pm) · 2 replies

I'm trying to mount some flames on the back of a missile. Have this working no problem, but ...

The missile is rotated and flying at an angle. The initial flames mounted is in the vertical plane and then a split second later the flames rotate to follow the angle of the missile. This looks odd in the game.

Any ideas on how I can prevent this initial mount not following the angle of the missile. I've tried a setvisible(false/true) timer but this just seems to leave the flames not attached to the object.

Here is my code:

%this.flames.mount(%this, 0, -8.000, 0, true, true, true, true);

The "this" object is the missile.
Cheers

#1
05/05/2010 (5:07 pm)
tried rotating the flames to match the angle of the rocket before mounting?
#2
05/06/2010 (8:38 am)
Thanks Craig - I tried matching the rotation but I could never get them the same. I got it working in the end by setting the blend alpha of the flames to 0, attaching flames to missile and then 200ms later setting blend alpha of flames to 1.0.

It was all moot in the end as I decided I didn't like the effect - the flames were the missiles burning up as they hit the world limits on the sides of the screen.

Cheers