- Home /
How do you activate parented rigid-bodies with joints?
When I call setActiveRecursively(true) on GameObjects with rigid-bodies that have hinge joints, the entire physics simulation goes haywire. The simulation works quite perfectly until I try to do anything with active/inactive.
I need to have the simulation deactivated until needed for performance reasons.
after extensive testing, I have found that Unity physics that involve joints should never have the active/inactive setting played with. (never turn them on or off)
I have found a workaround...
I wanted to have my physics system not active until I needed it. So I was leaving it inactive until it was ready to be used.
Ins$$anonymous$$d of using active/inactive as a method to activate your system, turn your entire parented system into a prefab. Instantiate that prefab when needed, and destroy it when not needed.
Your answer
Follow this Question
Related Questions
hinge joints go crazy when not active and setActiveRecursively is called : chain links 0 Answers
HingeJoint2D Teleportation 1 Answer
How to go about filling the gaps between segmented objects connected with hinge joints? 0 Answers
Hinge Joints ignore limits 0 Answers
2D 360 degress platformer example needed 0 Answers