- Home /
How to handle knockback
Hello, I see alot of similar, less detailed topics on this with no answers.
Maybe providing a bit more specificity as to my situation might help shake out an answer. I am making a hack n slash game with a combo system driven by root motion.
I want a certain select attacks to be able to apply knockback.
My dilemma is that root motion currently drives everything, and the best way i can think to drive knockback is by code, getting the direction of the weapon impact and using the gravity system from the rigidbody to send a character flying. However, im just not sure if its possible to use a non root motion animation of a character flying in place? It just seems really odd to combine the two. Also, not sure the best way to transition from literally any state into this knockback state. My mecanim controller is already getting pretty messy as is. I'm beginning to feel like I need to build some custom animation system for this but no idea where to get started on that.
Any advice is greatly appreciated.