diff --git a/GameEngine/src/main/java/gameEngine/entites/editorComponents/DraggableComponent.java b/GameEngine/src/main/java/gameEngine/entites/editorComponents/DraggableComponent.java index 6cc0649..958de54 100644 --- a/GameEngine/src/main/java/gameEngine/entites/editorComponents/DraggableComponent.java +++ b/GameEngine/src/main/java/gameEngine/entites/editorComponents/DraggableComponent.java @@ -135,9 +135,9 @@ parent.transform.setPosition(targetX, targetY, parent.transform.position.z); parent.screenTransform.setPosition( - parent.transform.position.x - cameraPosition.x, - parent.transform.position.y - cameraPosition.y, - parent.transform.position.z - cameraPosition.z + parent.transform.position.x, + parent.transform.position.y, + parent.transform.position.z ); if (isRightDrag) { @@ -156,9 +156,9 @@ ); componentParent.screenTransform.setPosition( - componentParent.transform.position.x - cameraPosition.x, - componentParent.transform.position.y - cameraPosition.y, - componentParent.transform.position.z - cameraPosition.z + componentParent.transform.position.x, + componentParent.transform.position.y, + componentParent.transform.position.z ); } }