- Home /
Static collider restitution
Hi all, I read pretty much all I could about static colliders (colliders without a rigid body), but I still can find the reason behind what I'm seeing. I have a basic pinball setup, with a ball with rigid body and collision detection set to continuos dynamic. My problem is that if I set the table to be a static collider, the ball bounces off it like crazy, regardless of the material bounciness (both materials are set to 0 bounciness, and minimum combine). If I assign a rigid body to the table, the problem goes away. Looks like a bug to me. Probably for a static collider collisions are resolved assuming really big mass, but for some reason restitution is not working correctly.
Answer by nsxdavid · Feb 25, 2013 at 01:14 AM
A static mesh should not cause that to happen.
First, check the scale you are working at. If things are too small you can sometimes get issues because of the way collisions try to resolve penetration. Create a standard cube in the scene so you can use that as a 1-unit guide.
I infer that the table is a very complex shape. Check that you did not set the mesh collider to be Convex. Also make sure the correct Mesh is set there.
The mesh is correct and the convex flag is off. The table is 2 units long and 1 wide. I can try to scale it up
Also, i might be wrong but I think the problem with small scale arise only if you don't set the collision penalty threshold accordingly. I have $$anonymous$$e set to 0.001
Scaling dimensions by a factor of 3 seems to fix the problem. In order to cope for the dimensions change I also have to scale gravity accordingly to preserve the gameplay speed.
BTW @nsxdavid, what's the problem with the previous dimensions? Numerical precision hence instability?
Well various limits such as penetration threshold as @zaino mentioned. Extra note: Unity uses PhysX internally, so sometimes you can find info on the Google machine about PhysX that is also relevant.
So answer worked? $$anonymous$$ark it as answered, yeah? :)