Hey,
I am trying to make a VR fighting game like gorn, Creed etc. I tried using an animation based system but it just feels off now I am trying to make a physics based system which will use the skeleton’s physics.
What I am currently doing is I start simulating physics after the motion controller begins to overlap with the ai actor.
The problem: The enemy AI keeps on falling.
I can hit it on the ground but it just falls in a ragdoll like fashion after the first punch.
Question: How can I make it so the enemy AI keeps on standing after the first punch? (How can I simulate physics and have the AI stand on its feet)
This is not an exact solution, however it will give u an idea. Create a variable for health and set a value for e.g., 100.
On one punch you reduce a value of 10. Until it becomes zero, disable the gravity of the enemy, so that it will not fall. Make a condition that if the health is 0, then enable the gravity of the enemy and add a fall animation, so that it looks natural while falling.
You can find the gravity option under physics. Hope this helps !
Hey thank you for the answer I have implemented your solution and it works great with one problem. The character is kind of floating in place when gravity is disabled. Is there any way I can make it so its a little more grounded?