diff --git a/src/main/java/cactusServer/entities/MovableObject.java b/src/main/java/cactusServer/entities/MovableObject.java index bd87b98..4d6d1a2 100644 --- a/src/main/java/cactusServer/entities/MovableObject.java +++ b/src/main/java/cactusServer/entities/MovableObject.java @@ -72,7 +72,7 @@ public void setPosition(Position3D position) { this.position = position; - ((Object3D)(getPlaceable().getBody())).setPosition(position); + if(placeable != null)((Object3D)(getPlaceable().getBody())).setPosition(position); } public void setVelocity(Velocity3D velocity) { @@ -85,7 +85,7 @@ public void setAngle(Quaternion3D angle) { this.angle = angle; - ((Object3D) getPlaceable().getBody()).apply(angle, false); + if(placeable != null)((Object3D) getPlaceable().getBody()).apply(angle, false); } public void setAttribute(Attribute attribute) {