diff --git a/src/main/java/cactusServer/models/CollisionManager.java b/src/main/java/cactusServer/models/CollisionManager.java index 7de6a2d..183b3a2 100644 --- a/src/main/java/cactusServer/models/CollisionManager.java +++ b/src/main/java/cactusServer/models/CollisionManager.java @@ -52,9 +52,9 @@ int size = result.size() - 1; CollisionResult current = result.get(size); Position3D position = object.getPosition(); - position.setX(position.getX() + current.collisionPoint.getX()); - position.setY(position.getY() + current.collisionPoint.getY()); - position.setZ(position.getZ() + current.collisionPoint.getZ()); + position.setX(position.getX() + current.length * current.normal.x); + position.setY(position.getY() + current.length * current.normal.y); + position.setZ(position.getZ() + current.length * current.normal.z); object.setPosition(position); }