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>

(cherry picked from commit a87efd7d0157a0c4074e639b1da923f5c335f663)
This commit is contained in:
Plykiya
2024-08-06 14:02:01 +03:00
committed by Spatison
parent a81887ce45
commit aaeda1b538
31 changed files with 83 additions and 55 deletions

View File

@@ -105,7 +105,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
var xforms = EntityManager.GetEntityQuery<TransformComponent>();
var xform = xforms.GetComponent(gridToTransform);
var (_, gridWorldRotation, gridWorldMatrix, invGridWorldMatrid) = xform.GetWorldPositionRotationMatrixWithInv(xforms);
var (_, gridWorldRotation, gridWorldMatrix, invGridWorldMatrid) = _transformSystem.GetWorldPositionRotationMatrixWithInv(xform, xforms);
var localEpicentre = (Vector2i) Vector2.Transform(epicentre.Position, invGridWorldMatrid);
var matrix = offsetMatrix * gridWorldMatrix * targetMatrix;