- Home /
Spontaneous combustion/collisions(best I could come up for a title)
SUCCESSS !!! see below
This seems long, but it is not, it is easy... had to give all the steps.
1 Concoct a crater by raising a circular ridge of terrain high enough to keep objects within the crater.
. Make it big enough to be able to cut donuts within it running a simple vehicle(box with 4 wheels).
. Floor of crater is at x,0,z -- Physics Material on terrain is 'Metal' or 'Wood'.
2 Make a simple Vehicle mass 900, with rigidbody, BoxCollider(physics none), 4 wheelColliders.
3 Create 10 spheres(balls) .74 meter Radius. (<- corrected - had erroneously stated .65 Diameter) . Make balls oblong so they do not roll as much as round ones would.
. Balls mass 15 each, with rigidbody. CapsuleCollider(Physics: wood), radius .65.
4 Place the balls in a triangular configuration somewhat near the raised terrain area, within the crater.
. Stand them on their small end so as to acquire a tight formation, like bowling pins or billiards balls.
. The colliders of each of the balls do not intersect at rest in the triangular formation.
. Place vehicle within the crater as well, where you wish.
. Drive the vehicle like a 'madman'(person) until you cremate into the apex of the balls triangle.
. Watch all the balls explode in all directions and roll back down the crater ridge.
. Note: balls tend to go straight out in front of fhe vehicle, those on the side(not in direct line of hit) may remain standing or move much less.
. All is well.
5 This is where starts the problem.
. Start pushing any and all individual balls with the vehicle to attempt to gather them
. in an as tight a flat pile as you can anywhere you choose within the crater.
6 All appears well until at some point for apparently no reason at all, you are barely touching
. one of the balls with your vehicle attempting to push it nearer the others and an arbitrary
. count of the other balls just blow sky high and disappear in the Aether possibly including
. the one you are touching???
You can see the objects ricochet in the air as if they are retriggered repeatedly into a series of
deflected collisions(with 'nothing') until they disappear in the distance(or the abyss).
Sometimes they come back down to be found on the terrain, sometimes they vanish even after having come down???
What am I doing incorrectly that causes this unwanted behavior?
Has anyone run into this type behavior in a similar scenario?
Can others do this test, and report any findings?
As always, my appreciation.
Could be wrong, but I doubt you'll get anyone to recreate that test on their own; you'd probably have more luck if you made a Unity package (good) or webplayer (better) available. (I don't have much to offer beyond that except to say that what you describe sounds like it would be a bit of a stress test for most physics engines, so I'm not terribly surprised that it's blowing up on you.)
tldnr; If you're going to provide repro steps for a bug, it's best to boil it down to the simplest possible case. Try following all those steps but skipping one, if it still reproduces the bug, then remove it from the list and repeat. For example, I doubt that this bug is specific to 900kg vehicles with exactly four wheels.
t.y., I did a test that shed some light on the issue. Bursted the pile once, left objects as scattered, did not attempt to gather them. While I was traveling on terrain 1000 meters away from the crater... one object came down from the sky... I drove to crater, no objects were in it, all vanished LOL. I suspect the size ratio between mesh/rigidbody/collider(which ever 2) that is mentioned in the docs has something to do with it, but I cannot find that info in docs anymore. Will creat package if I am unable to come up with the answer.
umm the parameter I was thinking of is for character controller, ie: skin width... 10% of radius, greater than 0.01 ...testing different collider sizes.
Answer by dingben · Jan 05, 2011 at 08:00 AM
UPDATE: Nevermind, still does it... it is just unpredictable, except for the fact that the more you bounce the objects around the more chances there are they will blow into cybespace.
Original post
I changed only the colliders and now the objects are staying put. ...at the risk of speaking too soon, I may have the answer, or at least a step in the right direction.
I cannot be the only one who has or will encounter this problem, thus I hope this post will be valuable to someone.
The objects, all exactly the same, clones of one object, have a shape like a bottle of 'Perrier' that allows the collider to protrude outside of the object shape/mesh in one area.
As long as the objects were standing, that area of the collider never touched the canvas/terrain, but as soon as knocked around the collider portion that 'sticks out' of the objects mesh could come in contact with the terrain. I am wondering why they have to sit a period of time before PhysX kicks in? why do they not blow out immediately?
Now that I adjusted the colliders to not protrude at all, the objects do sit on the terrain slightly sunk-in, but none have blown up to the heavens since the change.
The collider protrusion can be eliminated by using multiple colliders on each object, scaling each collider to the area it covers, but how much of a cost would that impose on the game engine? 2 to 3 colliders where 1 should suffice... especially when I may have 100s of these objects concurrently in the view port.
A mesh collider should be a match to the shape but I am not sure I will be able to get the same behavior I get now without using any code at all.
...testing, more testing.
[ Had posted this on the wrong question/Answer... man my hospital stay may have fried me neurons! ]
Sorry for the long delay... in one word: hospital. Thank you for the suggestions. If I could remember how to show colliders in play, I might see something right off the bat.
I have noticed one thing, it only happens in a section of the scene a good 1/3 of it.
I was trying to get clues to resolve the issue without having to do what you suggest as it involves massive step by step inc/excluding objects and behaviors... (1/3)500 pieces at least. I am back on this now and will report my findings. I have recently encountered that animations can be a huge invisible source of much erratic objects behaviour. I have to REfamiliarize myself with Unity dev... that will take some time, and I have to step up many versions to get up to par.
wow... immediately after posting the above comment I clicked 'play' and was able to navigate all out without any problems... but as soon as the vehicle was shaken off its wheels the area where the problem exist started to trigger the behaviour again. ...and I did remember how to see colliders by simply turning them on while in play... and I am now thinking to place code on the vehicle to test for collision and see what it collides with... hm after more than 2 years off... I can't believe the neurons seem to want to function lol.
SUCCCCCESSSSSSSS!!! I have finally uncovered the problem - I have effectively stopped it from occurring. The question now is why certain animations cause this problem and only a few while others do not. I will report what I find... but THERE IS NO DOUBT that it is a clash with animations, even if miles away from the vehicle(totally utterly out of reach - lol) On one test the stuff go to so bad it beat the vehicle 1/2 way into the ground and left it unresponsive as if frozen in ice while the motor and directional controls still worked. hm!
Your answer