FIGHTING MECHANISM (sword. can easily add other melee weapons with this structure.)
no first person movement.
WHAT SHOULD BE WORKING:
left click to swing sword. sword should move in a smooth motion from right to left.
cube (test enemy) should move up/tilt up, this animation shows that the cube has been hit.
if you are trying to add a new enemy/weapon and its animation:
enemy: create [enemy name]-idle and [enemy name]-hit animations for when the enemy is idle or when its hit. the trigger to go from idle to hit MUST BE CALLED "Hit"
also add a tag named "Enemy" to the enemy, or else the enemy won't get attacked
weapon: create [weapon name]-idle and [weapon name]-attack animations for when the weapon is idle or when its attacking. the trigger to go from idle to hit MUST BE CALLED "Attack"
make sure you add the weapon inside the "Weapon Holder" object that is inside the main camera.
if you are having trouble you can read the 2 scripts i created, WeaponController.cs and CollisionDetection.cs. the scripts should be relatively self explanatory
FIGHTING MECHANISM (sword. can easily add other melee weapons with this structure.) no first person movement.
WHAT SHOULD BE WORKING:
if you are trying to add a new enemy/weapon and its animation:
if you are having trouble you can read the 2 scripts i created, WeaponController.cs and CollisionDetection.cs. the scripts should be relatively self explanatory