diff --git a/GameEngine/src/main/java/gameEngine/entites/Camera.java b/GameEngine/src/main/java/gameEngine/entites/Camera.java index b6314bd..b2e920b 100644 --- a/GameEngine/src/main/java/gameEngine/entites/Camera.java +++ b/GameEngine/src/main/java/gameEngine/entites/Camera.java @@ -1,5 +1,7 @@ package gameEngine.entites; +import org.joml.Vector3f; + public class Camera extends Entity{ public enum ProjectionType{ @@ -12,6 +14,17 @@ public Camera(String id, ProjectionType projection){ super(id); this.projection = projection; + this.position = new Vector3f(0, 0, 0); // 初期位置を原点に設定 + } + + private Vector3f position; + + public Vector3f getPosition() { + return position; + } + + public void move(float x, float y, float z) { + position.add(x, y, z); } }