I'm trying to simulate a soccer game. I have a SCNPlane
that simulates the court. I have imported a Soccer goal 3d model (.dae
file) and also a ball model (.dae
).
My ball has a dynamic physics body, the plane static and the goal is kinematic. I have set the categoryBitMask
and contactTestBitMask
for each one of the SCNNodes.
When I shoot the ball against the goal then sometimes the ball bounces and behaves as expected, but some other times the ball goes through the goal net and crosses it.
I have also assigned the SCNPhysicsContactDelegate
and the didBeginContact
is triggered when the ball bounces agains the goal but when the ball crosses it then the method is not called.
Do you know what might be happening?
Thank you!