- Home /
Getting 'Real' behavior through physics settings
I've got a random assortment of objects that you'd find on a desk to be used in a scene. All of these objects will eventually interact with one another during one level or the next. I've added collision capabilities using concave, compound, and primitive colliders.
Let's use my pencil as an example. A capsule collider suits the shape quite well and you would expect the rounded bottom to mimic the behavior of a sharp point, and fall over. However, the rigidbody falls asleep before the pencil falls over. So if you can imagine it, there's a razor point pencil just standing straight up after falling. I have tried decreasing the Sleep Velocity and Sleep Angular Velocity to as low as .03 and .02 respectively. Doesn't seem to make a difference in the time it takes for the pencil to fall asleep and the next object to come into play. Rotating it slightly gives you better behavior, but I can't guarantee my users are going to do that. Even a paper-thin business card just stands on its lowest box collider face (any thinner and it doesn't detect collisions properly).
The only thing that seems to help is decrease the Min Penetration For Penalty to 0. But this causes jittery behavior and the pencil eventually falls over, but not until after a long period of 'What the hell is this shaking pencil doing?'
So, any ideas on how to help my objects behave more realistically? Mass? Drag? Slippery materials? I am developing this project for mobile platforms so performance will have to be weighed into the final solution.
I also have a pair of scissors with colliders more intricate than a simple capsule that just stand on their point. Would it be a center of gravity thing? These scissors are symmetrical, but there is definitely more geo on one side (handle vs blade).
Another fun fact: if I mess with angular drag while the game is running by bringing it up to about 3.0 and then down to zero, it shakes it enough to fall over. Feels like a patch to a bigger issue though. I don't want to shake my objects over, I want them to just fall on their own. I've resorted to turning down the sleep values to .00001, even. BAH.
Answer by NAKAS · Feb 28, 2013 at 07:14 AM
Do you have physics materials on you objects? i have encountered what you are experiencing when my rigid body was on terrain that didn't have a material assigned to it. high drag or angular drag could also cause that.