cringe bug fix im stupid
in HealthHandmer
This commit is contained in:
parent
37bed1fd33
commit
f5acd70d85
11 changed files with 135 additions and 53 deletions
|
@ -21,7 +21,6 @@ public class AttackProjectile : AttackHandler
|
|||
{
|
||||
if (GlobalsVariable.AliveUnitsTeamA.Count == 0) return false;
|
||||
}
|
||||
_minecraftUnit.MovementHandler.UpdateNearest();
|
||||
}
|
||||
float launchAngle = findLaunchAngle();
|
||||
//print(launchAngle);
|
||||
|
@ -47,6 +46,7 @@ public class AttackProjectile : AttackHandler
|
|||
// Source : https://en.wikipedia.org/wiki/Projectile_motion#Angle_%CE%B8_required_to_hit_coordinate_(x,_y)
|
||||
|
||||
AbstractUnit targetUnit = _minecraftUnit.MovementHandler.TargetUnit;
|
||||
if (targetUnit == null) return -1f;
|
||||
Vector3 diffVector = targetUnit.transform.position - spawnPos.position;
|
||||
Vector3 projectOnPlane = Vector3.ProjectOnPlane(diffVector, Vector3.up);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue