im trying to program a car steering. So I need the angle of the wheels to lock relative to the car object. I cant figure out how to tell it to be angle in relation to the object and not the room. I tried this at first.
image_angle = point_direction(x,y,mouse_x,mouse_y);
if (image_angle > 45) && (image_angle <180){ image_angle=45;}
if (image_angle > 180)&& (image_angle <315) {image_angle=315;}
and then movement would be toward mouse
if keyboard_check(ord('W')){
motion_set(image_angle,VanSpeed)
but once i stop the angles still only go from 45 to 315 so i can only travel right.
i need the wheel to pull the car object and then wheel 45 to 315 will be in relation to the car body.
image_angle = point_direction(x,y,mouse_x,mouse_y);
if (image_angle > 45) && (image_angle <180){ image_angle=45;}
if (image_angle > 180)&& (image_angle <315) {image_angle=315;}
and then movement would be toward mouse
if keyboard_check(ord('W')){
motion_set(image_angle,VanSpeed)
but once i stop the angles still only go from 45 to 315 so i can only travel right.
i need the wheel to pull the car object and then wheel 45 to 315 will be in relation to the car body.