Why are my collisions adding massive amounts of force?

I have a prefab that is cloned repeatedly to make a ground upon loading into the game. No issues there. When you right click, more clones are instantiated at the mouse location. This is where the problem occurs. The player runs around on the ground objects just fine. But if the player gets near the mouse instantiated objects or god forbid, touches one, a massive repelling force is applied, and not always after a collision. You can’t get near the new objects. The force is applied pre-collision and creates an buffer or shielding effect. Were you to actually make contact you are thrown across the map. What causes this?

The force is always applied on only the X axis. It doesn’t always happen with the first 1 or 2 blocks placed. Are the physics being broken all of the sudden? Has anyone ever experienced this or read about it somewhere else?

The player has a Rigidbody (Mass 0.1) and a Capsule Collider. The prefab has a Rigidbody (Mass 1) and a Box Collider. The details of the prefab are identical to both loading time clones and the mouse click clones in every setting from Rigidbody settings to Box Collider settings.

Any theories are much appreciated. :smiley:

when you instantiate the objects makes sure you give them the right values …e.g mass ,drag,use gravity and if it continuous or discrete , also check your scripts if there are fixdupdate or just update

I had the same issue yesterday… a truck with no forces apart from gravity, just a box collider and 4 wheel colliders… as soon as it touched the floor, it would rotate, accelerate sideways and fly off up into the sky, pretty awesome and funny… but not very truck-like behavior.

Sooo… what fixed it ?.. removed my code that was setting the center of mass… and just let the rigidbody set it, itself.

Turn off any scripts you are running, and make sure the rigidbody behaves as expected “without any other code/scripts running…”. drop the object onto a slope or some random objects to test.

Also try not to mix character controllers with physics based rigidbodies…