Sweenie wrote:Also noticed that when my vehicles(multibody and raycast) are moving close to a stack of boxes, the stacked bodies wake up even though the vehicles never touches them. Just being near them wakes them up.
Is that a normal behaviour?
Actually you can see this in the Newton demo as well, just run the "Stacked boxes" demo and grab one of the bodies from the pyramid and start swinging it close to the other bodies, you can see that the whole pyramid is waking up even though it never touch them(enable visible collision meshes).
Oh I forget about that, this is new for Newton 300. but you are correct is not completely correct.
This is what happen. In older cores contacts were generated at the Narrowphase pass, so only link that actually collide has contact joints.
The problem with this is that this makes the memory manager to do a lot of work creation and destroying joints.
In core 300 the joint are created at the BroadPhase AABB intersection.
This has several advantages.
-no need for padding AABB for continue collision sine CC of AABB is a close form problem that can be tested in contact time.
This is actually already done in the broad phase and the all hierarchical tree -collision.
-Save a lot of in memory manager in creation of detritions of joints.
-Is geared to Parallel programming. I do no know if you see it but there is a Parallel solves that solve all island at once in one go.
From time to time I make this solver the default. And tshi will be the OpenCL solver. This used to be the CUDA solver,
but I abandoned because did not CUDA support Atomics at the time, and I have to do lot of contrive red black partition that reduced solver coverage more than the gain it provided.
Id did not realize that if and dynamics body i close to another dynamics body that is already sleeping it will wake up the island.
In fact this work because there engine is so stable that some time I have to wrestle it so that is doe no bring a stack to sleep too soon.
I actually have a hack to prevent bodies form going to sleep.
The reason why it will wake up the island is because the technique for determine if an island is slipping is color coding the islands.
if an island has a color and touch another island of different color, the new island is painted to the color of the current island.
Static bodies are exceptions their color is transparent so the scanner only see the island they are connect at a time.
This allows static bodies to be connecting to multiple islands and no wake them up.
To sole this all I have to do is to dynamics bodies with contact joint with zero contact point as transparent.
Thanks you, very good find, because it will increase performance by a lot.
I will fix this bug first, since it can be reproduced in the demos.
As a side note: I bet you have not seem too many physics engines wheren island of stacked bodies wake up before you touch then and the state put?