How can I create physics borders for left and right sides of my scene?


Sorry for my english. It is not my native language.

I have a circle which has a physics body and that scrolls up the screen. This circle collides with square obstacles that has a physics body too and when the obstacle does not move. It is ok
and ball continue to scroll up. For variety of my game, I added obstacle that can rotate. But when my ball collides with rotating obstacle it goes out of the scene to left or right. How can I create INFINITY Physics borders to left and right sides of my scene. I need to create borders only for left and right sides. Because my ball has to scroll up and I already have physic body for down which do not allows my ball to fall out of the scene.

Maybe you can use the ball position to determine the appropriate action (screen min/max).

This topic was automatically closed after 166 days. New replies are no longer allowed.