Objects not acting according to physics
I have this fractured object with a parent object and all the fragments as child objects. All the child objects have their own rigid body and mesh collider. When I run the game the fragments fall but some of them go through the ground, while others just stick straight up, even though they are on a sharp point/wouldn't in real world physics. The mesh colliders are also not following the objects correctly, because when I click on the mesh colliders, it shows them bunched up in the middle (which is probably how it should be), and not in the same place as the object.
The mesh colliders are on convex, and the rigid bodies are not on kinetic.
Answer by streeetwalker · Sep 24, 2020 at 08:00 AM
Does your parent object have a Rigidbody also? if so, it is rule #1 that you do not put Rigidbodies on children - if you do their behavior will be messed up.
@streeetwalker No, the parent does not have a rigid body, the children do.
At this point we need to see the parent and child inspectors, how you've set up the Rigidbodies and meshes.
We need to know if you are applying any forces to the Rigidbodies. $$anonymous$$ake sure you don't try to alter their transform position, rotation or scale in any way in your code. If you need to rotate, move, or scale the children, use only Rigidbody calls, and if you are doing so over time only in FixedUpdate
The mesh colliders should coincide with the child objects themselves, and not be bunched up in the middle. That is a clue to the problem.
As far as the parent goes, if you are trying to move it around that can still cause potential problems because the children are controlled by the physics engine - it depends what you may be doing to the parent.
The upshot is, you must have other things going on. What you are experiencing is not merely because you have colliders and Rigidbodies on the child objects.
The parent object nor the child objects have scripts attached. There are scripts that swam the objects or situations where forces may be applied but for now, that's not the problem because this problem happens when I just have the object and hit play, with nothing else happening.
I want to upload a photo but can't seem to get the photo under the maximum storage amount. Basically, I have a parent object (modified scale) with multiple child objects (unmodified transform), each with a mesh, mech renderer, rigid body, mesh renderer, and material.
Your answer
Follow this Question
Related Questions
Add Torque goes bad when "Convex" is checked in Mesh Collider 0 Answers
Smooth motion rigidbody 1 Answer
Collision Between Two Child GameObjects 0 Answers
VR physics issue 0 Answers