0
Answered

Avoid draw animation.

Riccardo Provazza 4 months ago in Melee updated by Marti (Lead Developer) 4 months ago 5

How can I make the player attack without draw animation?

Video Example:

Unity version:
2019.3.11f1
Game Creator version:
1.1.8
GOOD, I'M SATISFIED

It didin't solve my problem, but at least they quickly aswerd me.

Satisfaction mark by Riccardo Provazza 4 months ago
Answered

When a character draws a weapon, it uses a Character State. This State has an idle pose (or a collection of locomotion ones) plus an "On Enter" and "On Exit" animation clips, which are the ones that are played when drawing the weapon.

To remove the drawing animation, simply make these On Enter and On Exit clips point no animation clip and the entire animation will be skipped.

I already do it but every time that I press the attack button, the player draw the weapon, then attacks

+1

Well, a weapon must be drawn before attacking, at least from the code perspective. There's no way around this.

So there's no way to emulate the attack system like in the video? (in Genshin Impact the equipped weapon can be changed)

+1

You can use the Character State as a normal locomotion one when drawing the weapon and change the Character State's 3rd Layer (used by the Melee module) when the character attacks. This will change the state into a more "combat-like" position.

You could even make a timer that after 20 seconds without attacking, the character changes its character state to a more relaxed one.