Fixed teleport enemies bug (swapped Y and Z values....)

This commit is contained in:
2026-02-26 20:06:18 -08:00
parent c043c6ad04
commit 0c4a424a4d
3 changed files with 10 additions and 20 deletions

View File

@@ -215,7 +215,7 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
var spawnPointsGodotCollection = new Godot.Collections.Array<Marker3D>(spawnPoints);
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
GlobalPosition = new Vector3(randomSpawnPoint.GlobalPosition.X, 0, randomSpawnPoint.GlobalPosition.Y);
GlobalPosition = new Vector3(randomSpawnPoint.GlobalPosition.X, GlobalPosition.Y, randomSpawnPoint.GlobalPosition.Z);
_previousPosition = GlobalPosition;
if (this is IHavePatrolBehavior patrolEnemy)