diff --git a/GameEngine/src/main/java/gameEngine/entites/editorComponents/EntityView.java b/GameEngine/src/main/java/gameEngine/entites/editorComponents/EntityView.java index 344dd5f..53e449a 100644 --- a/GameEngine/src/main/java/gameEngine/entites/editorComponents/EntityView.java +++ b/GameEngine/src/main/java/gameEngine/entites/editorComponents/EntityView.java @@ -1,6 +1,7 @@ package gameEngine.entites.editorComponents; import gameEngine.entites.EditorEntity; +import gameEngine.geometry.Transform; import gameEngine.views.Sprite; import gameEngine.views.Window; import org.joml.Vector3f; @@ -35,15 +36,15 @@ @Override public void update() { - sprite.setPosition(parent.transform.position); - sprite.setRotation(parent.transform.rotation); - sprite.setScale(parent.transform.scale); + Transform transform = parent.transform; + sprite.setPosition(transform.position); + sprite.setRotation(transform.rotation); + sprite.setScale(transform.scale); sprite.update(); - Vector3f pos = new Vector3f(parent.transform.position.x-30,parent.transform.position.y+8,parent.transform.position.z); - portviewA.update(pos, parent.transform.rotation, parent.transform.scale); + Vector3f pos = new Vector3f(transform.position.x-30,transform.position.y+8, transform.position.z); + portviewA.update(pos, transform.rotation, transform.scale); portviewA.handleDragging(); -// pos = new Vector3f(parent.transform.position.x-15,parent.transform.position.y+40,parent.transform.position.z); -// portviewB.update(pos, parent.transform.rotation, parent.transform.scale); + } @Override