- Home /
Physics not working properly
I have a scene with a table and a playing block set on top of it.
I have to manipulate the block using the six degrees of freedom. The manipulation works fine but my issue is that when I rotate the block around any axis it goes through the table.
Here is how I have the block set up:
Block: - Rigid Body: i have the collision mode set to continuos dynamic - Box collider - Six degrees of freedom script (allows me to pick up the cube and manipulate it)
Table: - Rigid body: I have the collision mode set to continuous
Do I have to do something else in order to get my block object from going through the table whenever I rotate it?
Perhaps you have the scaling too small. This means that the thickness of the table will be dangerously close to the Skin depth or allowed penetration of the Colliders.
If table is static, try a mesh collider marked as static on it.
@meat5000 thank you for your prompt reply. I tried it but it didn't work. And yes, the table is set to static, then I removed the box collider component and went ahead and replaced it with a mesh collider.
What function does your six degrees of freedom script use for rotations? It may just be rotating the block without taking collisions into account at all. You might want to try using rigidbody.AddTorque() to make sure physical interactions proceed normally.
Also remember to not mark the colliders as trigger.
Answer by Xtro · Jun 04, 2014 at 08:18 PM
Are you rotating the object by applying torque via physics engine or are you rotating it via its translate.rotation ?
You should add torque to make physics engine to work correctly.
FYI, "Static" checkbox of the object(at the top of the inspector) has nothing to do with physics engine. It's only used for navigation baking, lightmap baking and similar stuff.
A collider is static when it doesn't have a rigidbody. If a collider has rigidbody, it's dynamic.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Parenting Preventing Player Rotation 0 Answers
C# Need Help converting from Rigidbody to Character Controller 0 Answers
Why does IsSleeping() keep returning false? (Billiard Logic) 0 Answers
Unexpected "Jumping" Behavior 0 Answers