Make humanoid fall if lifts both the legs or if the humanoid looses balance at runtime.
Here what I need to do is, to make the humanoid fall or display an error if the body looses its balance during runtime, as I would be animating the humanoid during runtime. Is there a way to do this? Also, is there a way for applying inverse kinematics during runtime?
Comment
You can have a vector tied to the base of your gameobject (by script or by anything else).
Then, you can make a vector cross calculation in order to know if this vector is not perpendicular to the ground. If you use a box collider, even when you jump, the box will remain straight. If the vector cross is not 0 (I think), then your character is loosing balance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612052836im_/https://answers.unity.com/themes/thub/images/avi.jpg)