G
gacl
Guest
I'm trying to avoid the use of 'speed'.
my whole ship movement script looks as follows:
if keyboard_check(vk_space)
{
obj_ship.x += cos(radtodeg(obj_ship.image_angle)) * 3;
obj_ship.y += sin(radtodeg(obj_ship.image_angle)) * 3;
}
if keyboard_check(vk_left)
{
obj_ship.image_angle += 3;
}
if keyboard_check(vk_right)
{
obj_ship.image_angle -= 3;
}
However, the ship is going all over the place, moving in any direction it wants to, seemingly randomly.
Can anyone tell me where I'm going wrong? I have the tip of my ship facing upwards, if it helps.
my whole ship movement script looks as follows:
if keyboard_check(vk_space)
{
obj_ship.x += cos(radtodeg(obj_ship.image_angle)) * 3;
obj_ship.y += sin(radtodeg(obj_ship.image_angle)) * 3;
}
if keyboard_check(vk_left)
{
obj_ship.image_angle += 3;
}
if keyboard_check(vk_right)
{
obj_ship.image_angle -= 3;
}
However, the ship is going all over the place, moving in any direction it wants to, seemingly randomly.
Can anyone tell me where I'm going wrong? I have the tip of my ship facing upwards, if it helps.