Replace xform.WorldPosition with xformSystem method for Setting/Getting (#30029)
* GET WORLD POSITON, ROTATION * Missing parentheses * ui system depndency * the issue * Unused * Let the function do the transform --------- Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -81,10 +81,12 @@ public sealed class NPCSteeringOverlay : Overlay
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly SharedTransformSystem _transformSystem;
|
||||
|
||||
public NPCSteeringOverlay(IEntityManager entManager)
|
||||
{
|
||||
_entManager = entManager;
|
||||
_transformSystem = _entManager.System<SharedTransformSystem>();
|
||||
}
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
@@ -96,7 +98,7 @@ public sealed class NPCSteeringOverlay : Overlay
|
||||
continue;
|
||||
}
|
||||
|
||||
var (worldPos, worldRot) = xform.GetWorldPositionRotation();
|
||||
var (worldPos, worldRot) = _transformSystem.GetWorldPositionRotation(xform);
|
||||
|
||||
if (!args.WorldAABB.Contains(worldPos))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user