Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by AntonSynytsia » Fri Feb 20, 2015 10:30 pm
It seems to me that continuous collision doesn't trigger AABB overlap callback:
AABB Overlap TestIn this example, my AABB overlap callback returns zero (because two bodies are meant to be non-collidable), but with continuous collision enabled, the contacts are still processed, which might state that the aabb overlap callback wasn't called. Both bodies have a Box collision.
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by AntonSynytsia » Sat Feb 21, 2015 7:46 pm
It seems that continuous collision mode triggers contacts callback without triggering the AABB overlap callback. It would be nice if it triggered an AABB overlap callback before triggering the contacts callback, so that the user could make a decision whether or not the contact joint should be created.
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by AntonSynytsia » Sun Feb 22, 2015 6:30 pm
I have a question of how "continuous collision check" works: Does it check for potential collision with all bodies or with particular bodies? If it checks for potential collision with all bodies, then the technique could be inefficient. I'm thinking of having continuous collision check simply scale AABB of body depending on its velocity. Then, check for potential collision with bodies overlapping the scaled AABB.
Example:
Lets say body has a normal AABB of min(-1,-1,-1) and max(1,1,1).
If body continuous collision is enabled and velocity is [10,0,0], the scaled AABB of the body would be min(-1,1,1) and max(10,1,1). Now, the potential collision check would be done with bodies intersecting the new scaled AABB.
Of course, the scale ratio constant could also be added because scaling exactly by velocity could either prove new bounding box too small or too big.
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by Julio Jerez » Sun Feb 22, 2015 7:35 pm
I have not have the time to look at this.
I look at the video and I am confuse because I see one box going over the other with and without CCD
To my knowledge AABB call back work the same way for CCD and for decrete collision
The function is call from the brad phase, and if an island is in CCD, then the entire island is declared in CCD mode, and the solver resolve the collision using by advising the isled to the moment of collision and resolution again, the proccess is repeated until no more time is left for the island..
I am not sure when do you expect the AABB overlap call be to be called,
Do you know how to hack any of the sdk demo, to recreate the same bug. the will be easier to determine what is that you look for.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by AntonSynytsia » Sun Feb 22, 2015 9:36 pm
Julio Jerez wrote:I look at the video and I am confuse because I see one box going over the other with and without CCD
It does go through in both cases, but in first case, with continuous collision enabled, the falling box rebounds the static box and then goes through. Ideally, however, since my AABB callback returns 0, there should be no rebound.
Julio Jerez wrote:I am not sure when do you expect the AABB overlap call be to be called,
Do you know how to hack any of the sdk demo, to recreate the same bug. the will be easier to determine what is that you look for.
I will do that.
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by AntonSynytsia » Sun Feb 22, 2015 10:25 pm
Here is the demo. Copy and paste over the ...\sdkDemos\demos\, compile the DemosSandbox, and run the Using Newton Mesh Demo.
You will see that the box first rebounds and then falls through, but ideally it should not rebound because the default material AABB overlap callback is set to return 0.
- Attachments
-
- UsingNewtonMeshTool.zip
- (2.82 KiB) Downloaded 381 times
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by Julio Jerez » Mon Feb 23, 2015 2:46 am
yes you were correct, CCD was not calling onAABB overlap, after first pair detection
Fixed. Please sync.
Thanks for the test that reproduced the bug so easy
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 6 guests