Hi all,
i want to limit my character from moving far away from a scrolling object {which the character is attched to}. How can i write the expression - if the X is bigger than a number, then ignore the input from the "Right/left button". I cant figure the first part- how to get the X coordinates of an object + the distance i need for reaching the limit.
thanks!
Develop games in your browser. Powerful, performant & highly capable.
Something like this would work
x > object.x+200
You could also use the clamp expression
clamp(x, lower, upper)
so something like clamp(player.x,object.x-200,object.x+200)