- Home /
Question by
JohnHoward312 · Feb 02, 2021 at 04:12 PM ·
2draycastbounds
What should I use as boundaries to a 2d game?
Right now I am using a position clamp for boundaries as well as setting velocity to zero. However I want to use raycasts now and I want the raycasts to detect the point that they hit along the screen boundaries so I can draw lines there. What should I do now for my boundaries? Should I use a script to make gameobjects with box colliders or is there a way to make raycasts detect when they've gone out of bounds?
Comment