unity-game-enginegame-physicsphysx

Unity3D, "knocked away" type light object?


In a Unity scene, imagine

in real life, the sticks would stand there (to begin with, this is annoyingly hard to achieve in PhysX actually), and when the large object hit them,

I have found this quite hard to do in Unity.

Normally you'd say: "give the large object a mass of a few thousand, and the sticks a mass of only 1 or 2 kg".

However I found that really doesn't work - the sticks DO tend to swirl the large sliding object around.

And if you set the angular drag of the large object high, that's not then what you want for it's other behaviors.

In the first instance I made the sticks kinematic (so they would stand up without falling over) and then when the large object whacks it ..

protected void OnCollisionEnter(Collision collisionInfo) {

    rb.isKinematic = false;
}

Perhaps the only way to do this is

How to do this in the Unity/PhysX milieu?


Solution

  • (Converting my comment to an answer)

    Small objects will affect large object in real life, but just slightly (so maybe there are too many sticks?). Or maybe the problem is in the way sticks are stuck into the ground? I've created test scene with cube (1000 kg) and some cylinders (1 kg). All objects are just standing freely on the ground. Here what it looks like when the cube hits cylinders: enter image description here