2021-05-24
It's often quicker/simpler/efficient to write code instead of setting up a visual script. But there's something to be said for expressing the same result in an elegant visual script. It's like a creative restriction.
To control a Game Creator Ragdoll, one can loop through and alter the rigid bodies that get auto-generated at runtime.
One could search for the rigid bodies by component but I opted to store them in a List of GameObjects on the Character itself. It's a small list of 10 objects: spine, head, 4 legs and 4 arm pieces.
Once that's done, it's just a matter of modifying the rigid bodies by looping through the list.
The Modify action applies some upward force and turns off Gravity
and ensures Is Kinematic
is not turned on.
The Reset action sets Gravity back to the original value.
End result: