The offending code, in obj_playership step event:
//speed and brakes
if keyboard_check(ord("W")) and speed < ship_maxsp{
motion_add(image_angle,ship_accel);
}
if keyboard_check(ord("S"))and speed < ship_maxbacksp{
motion_add(image_angle,-ship_decel);
}
//rotation
if keyboard_check(ord("A")){
image_angle += ship_turnsp;
}
if keyboard_check(ord("D")){
image_angle -= ship_turnsp;
}
//shooting
if keyboard_check_pressed(vk_up){
instance_create(x,y,obj_blueblaster);
}
obj_blueblaster creation event:
image_speed = 0; wpn_accur = obj_playership.image_angle + random_range (-4,3); image_angle = obj_playership.image_angle; motion_add(obj_playership.image_angle,10);
When the ship is not moving, only turning, the shooting is fine. When the ship is moving and turning and shooting the bullet shoots too far into the turn direction. My guess was to set a point in front of the ship and have the bullet head towards it, but that didn't seem to work either. Thanks in advance.



Find content
Not Telling
