I have two physics objects that will collide eventually. One of those has this property:
.isSensor = true.
I would like to remove one of the body when these objects collide, but having this error:
“physics.removeBody() cannot be called when the world is locked and in the middle of number crunching, such as during a collision event”
I saw in some posts that removeBody is better used with some delay so the physics is done.
My questions is:
My two objects will collide but will maintain position, so the event on the function will never reach the “ended” state. So i want to removeBody of one of those objects while colliding. Is it possible?