1
votes

I'm developing a game where there is a ball (dynamic object) and some static object randomly moving around the world (manually moved through y and x by a timer). As obvious the ball moving collide with these object and here all as expected and when the ball collide with an static object this change direction to move. However I would to find a way to avoid these static object to overlap in case of "collision" between them. I know static object doesn't collide with other static object and this is my problem. Sine I'm not expert in box2d someone can suggest me a way to avoid overlapping? In pratical it would mean give to the static object the "ability" to detect if there is a collision with similar static object and react in the same way of ball collision. Switch static object to dynamic have the consequence the object will react to collison on force and this is not what I want. The ball must collide like with a wall and the object just change direction. Hope to explained well my problem. Thank you

1

1 Answers

0
votes

If someother have same problem best solution I found was to create a dynamic object with a sensor fixture same size of my target one and connect to the static object thorugh a weld joint...