direction+5?

V

veko

Guest
Hello, you know how you can for example make instance_create(x+5,y,obj_test)
Is it possible to make +5 for direction, to be 5 pixels in front of the direction of player.
If yes, how?
Thank you!
 

matharoo

Udemy Instructor
Hello, you know how you can for example make instance_create(x+5,y,obj_test)
Is it possible to make +5 for direction, to be 5 pixels in front of the direction of player.
If yes, how?
Thank you!
Code:
var xx = lengthdir_x(5, direction);
var yy = lengthdir_y(5, direction);
instance_create(x + xx, y + yy, obj_test);
 
Top