goodbye collisions
This commit is contained in:
@@ -10,7 +10,7 @@ public partial class RangedEnemy : BasicEnemy
|
||||
{
|
||||
var convertedPlayers = players.Select(x => (Node3D)x);
|
||||
var target = convertedPlayers.OrderBy(x => Position.DistanceTo(x.Position)).FirstOrDefault();
|
||||
var hitBox = GetChildren().OfType<Area3D>().Single();
|
||||
var hitBox = GetNode<CharacterBody3D>("CharacterBody").GetChildren().OfType<Area3D>().Single();
|
||||
hitBox.LookAt(target.Position, Vector3.Up);
|
||||
hitBox.Rotation = new Vector3(0, hitBox.Rotation.Y, hitBox.Rotation.Z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user