This is close to fighting game collision I can get to. I used the collision from Brackeys
Fighting game colission
Code (JavaScript):
- #pragma strict
- var Damage : int = 50;
- private var Distance : float;
- var MaxDistance : float = 1.5;
- var TheAnimator : Animator;
- var DamageDelay : float = 0.6;
- var straight;
- function Update ()
- {
- AttackDammage();
- }
- function AttackDammage()
- {
- //Actual attacking
- var hit : RaycastHit;
- var ray =...