0

How to stop the character rotates or change direction when attacking clip is playing

mo D 1 month ago in Melee updated by BV123 2 weeks ago 3

The problem is the character both player and AI can change direction or rotate when the melee attack is in the recovery stage.

My character face direction is using movement direction and camera motor allows orbit input.

The attack animation will become weird like 360 spinning if the mouse input is fast as well as the AI.
I tried to change stagger in the melee animation setting -> combat -> posture, but the character can still change direction and rotate.

I would like to allow the character to rotate only the melee animation is finished, after the recovery stage.

How can I do that?

Unity version:
2019.4.5f1
Game Creator version:
latest

I tested the melee demo, it also has the same problem.

The character will always rotate toward the target

In "On Execute" event of melee clip, you change "Player Movement Input" into None and stop character locomotion with a custom action to execute "character.characterLocomotion.Stop();" then turn back into "Directional" in recovery phase or whenever you want.

You could also use a Character Property Action to temporarily disable player control during the attack.

You could also set the Melee Focus Target Action to Release followed by a Wait Action for the length of the attack

and then another Melee Focus Target Action to refocus back.