Total newbie at Unity here. I’m trying to have a ball bounce around while following the player. While I’ve accomplished that, I’m trying to keep the ball within the player view as the player moves around the level.
I tried attaching box colliders set up around the camera, and while it does work in keeping the ball in player view, it won’t let any objects with rigidbodies outside the camera enter the scene view anymore.
Is there any better way in keeping the ball bouncing around while keeping it inside the camera? Thanks.
Sounds like you have some problem-solving to do! I think you have an alright solution actually, maybe you can use a tag or layer so that objects can differentiate between those colliders and others? Or maybe a trigger area that reverses the ball’s velocity in x and z directions, so that objects can still move in and out of the camera? Also if you can have a reference to the main camera, perhaps you can find a way to use its field of view to calculate exactly when to reverse x and z velocities of the ball so that it bounces back into the scene.