Is it possible to create a small project that contains the error and send it to support@felgo.com ? We haven’t been able to reproduce that issue so far.
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.
Could this work for you?
Cheers,
Alex
This reply was modified 8 years, 11 months ago by Alex.
This reply was modified 8 years, 11 months ago by Alex.
This reply was modified 8 years, 11 months ago by Alex.
By signing up, you consent to Felgo processing your data & contacting you to fulfill your request. For more information on how we are committed to protecting & respecting your privacy, please review our privacy policy.
Want to find out if Felgo is a good fit for your company?
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: