Hello Unity community,
I am with one problem. If you look at the image attached you can see one small sprite at the center of the canvas. That gameobject starts with an force attached. The problem is:
When the gameobject (the simple sprite) hits the wall of the canvas, I want the sprite to bounce. The bouncing script isn’t a problem for me: I can add a new force. The problem is detect that my sprite HITS the “wall”. I don’t want any “wall” on the screen.
Can you please tell me how I can detect that the sprite / gameobject hits the “wall”?
Thank you very much 

Hi,
Since you know the size in pixels of your sprite and of the canvas, check in the Update the position of your unicorn sprite: say your canvas is 1920x1080p and your sprite is 100x100p, if the position of your sprite (with anchors in the middle) is (-910,0), it will mean that it’s touching on the left side of the canvas.
1920/2 = 960 so far left pixel has a x-coordinate of -960, sprite is 100px so anchor is at 50px in the middle, -960 + 50 = center of the sprite is at the exact position that gives the left border of the sprite on the left border of the canvas.
If it’s not clear enough, let me know and i’ll draw something 