is there a way to determine if my character is on the left or right edge of the visible screen? I want to limit his movement based on the screen device. I dont want the character to go off the screen since there is no scroll on him. Something like bound by screen would be ideal

is there a way to determine if my character is on the left or right edge of the visible screen? I want to limit his movement based on the screen device. I dont want the character to go off the screen since there is no scroll on him. Something like bound by screen would be ideal

is there a way to determine if my character is on the left or right edge of the visible screen? I want to limit his movement based on the screen device. I dont want the character to go off the screen since there is no scroll on him. Something like bound by screen would be ideal

Bound to layout would be ideal but since there is no scrolling on my main character, it ends like this: my character leaves screen and then game over. The invisible wall could work. Also i thought about restrict his x y movements but on different screen sizes/aspects the character could not reach the edge of screen or go beyond it.