Hello, need help. How can you limit the boundaries of the screen so the player cant go off-screen?
Some help needed
Gil
(Gil)
#2
FP.clampInRect (myEntity, 0 + originX, 0 + originY, FP.width + width, FP.height + height);
Use this in your entity’s update function and you should be fine
Isaac
(Isaac)
#3
Thanks for the help. but I dont know why it’s not working. I didn’t type in exactly the code you showed me, I adjusted it with the project im in.