2d top down racer shooter


Martin Cpetzee

Hi there, I am making a 2d top down driver/shooter game. So far, it's going good. However, I cannot gt an desired collision effect with AI opponents on paths. I want a 'spinout' sort of effect. (360 rotation) At the moment, I have this for o_enemy (which is obviously the AI test vehicle):

in Create:

rspeed = 5;
Point_dir = 0;
Is_Rotating = 0;
in Step even I have:

image_angle = direction

if (Is_Rotating == 1)
     image_angle += sin(degtorad(Point_dir - image_angle))*rspeed;
In case of collision with another vehicle:

Point_dir = image_angle + 270;
Is_Rotating = 1;
Its been a while since Ive used game maker, so Im rusty. That being said, this obviously doesn't work, both objects become stationary when colliding. Any advice would be greatly appreciated! See image for current results


Thanks in advance
Last edited by a moderator: