How to move character with left joystick, and attack in the direction of right joystick [SOLVED]

ThunderPorpoise

New member
I'm creating a Top Down 3D game where I would like the character to move and look in the direction of the left joystick, unless and until the right joystick is moved.

When the right joystick is moved, I would like the character to attack in the direction of the right joystick until you let go of the right joystick. It seems like the TopDown view and TopDown movement type should make this work if I could just add the basic attack animation to the look direction and then play that basic attack animation in the direction that the character is looking.

For melee characters, I would want the character to be rooted whenever they are attacking so that they just keep slashing away while standing place, even if the left joystick is moved.

For ranged characters, I would want the character to continue to move in the direction of the left joystick, while attacking in the direction of the right joystick.

Any thoughts?
 
For anyone who is wondering, I just went to the Use ability in Item Abilities under the Ultimate Character Locomotion section on Character, and switched the Start and Stop Type to Axis. I added a second input and changed the names to Mouse X and Mouse Y.

Then next to the State for the Use ability (which is Use), I checked "Append Item". So if your item type is Sword, the full state name would be UseSword. I then added a state UseSword to the section where the Movement state is and created a preset to lower my Root Motion Speed multiplier so that I move less when I'm using my sword. Works like a charm. The only thing I have to sort out is the transition between the attack and the non-attack states. Right now it takes a while before you can run at full speed. But I'll sort that soon.
 
Last edited:
Top