the contactNormal is calculated to determine the reaction of a body after a collision. As colliders with collisionTestingOnlyMode true do NOT respond to the collision, it is not calculated by Box2D internally. So this is the expected Box2D behavior, and it applies to both VPlay 1.5 and Felgo 3.0 in our tests.
Why do you need to know the contactNormal in this type of collision?
I’ve implementing pool-like playfield. I’ve took CarChallenge demo as example of pool-physics, however my items starting from the edges of the screen and at appear time it becomes collided with walls. So I’m trying to avoid this
The first approach that came to my mind is the following:
No use of collisionTestingOnlyMode at all. Instead you set the “categories” property of the Walls to e.g. Box.Category1 and the “collidesWith” property of your items to e.g. Box.Category2 (different from the walls) initially
This way they won’t collide upon appearance of the item. And once the item passed the wall after creation, you can change the “collidesWith” property of your item to the same as the walls have.
You will just have to figure out how to find out that the item has passed the wall initially. You could e.g. use a Timer and change the Category after a time that you are completely sure that you passed the wall. Or you use onXChanged and onYChanged signals to determine if the item is inside the “game field”, which of course could affect performance as they are called continuous. I am pretty sure there are also other and better possibilities, depending on your implementation.