The method I use now is incredibly glitchy; would it be possible to use a zdirection kinda thing?
Currently, I have the following:
///Mouse Look direction -= (display_mouse_get_x() -display_get_width()/2)/(10+xspd); //Use the horizontal mouse movement to look left or right pitch += (display_mouse_get_y() -display_get_height()/2)/(400+yspd); //Use the vertical mouse movement to look up or down display_mouse_set(display_get_width()/2,display_get_height()/2); //Put the mouse back at the center of the screen pitch = max(min(pitch,3),-3); //Make sure the pitch isn't greater than 3 or less than -3Left click:
///Shoot var bullet; bullet=instance_create(x,y,obj_bullet); bullet.direction=direction; bullet.speed=1; bullet.zspeed=tan(degtorad(pitch*-30));//This converts the variable Pitch to a measure of degrees, then to radians, then to the slope bullet.z=z+char_height;//Create at the player's height
z+=zspeed;Can anyone help with this?
EDIT: Added comments just so it's easier to see what I'm trying to do.