diff --git a/src/components/physics.worker.js b/src/components/physics.worker.js index e4e9dd1..68c0732 100644 --- a/src/components/physics.worker.js +++ b/src/components/physics.worker.js @@ -399,8 +399,8 @@ const addBoxToWorld = (size, height) => { const wallRightTransform = new Ammo.btTransform() wallRightTransform.setIdentity() - wallRightTransform.setOrigin(setVector3((size * aspect / -2) - .5, 0, 0)) - const wallRightShape = new Ammo.btBoxShape(setVector3(1, height, size)) + wallRightTransform.setOrigin(setVector3((size * aspect / -2), 0, 0)) + const wallRightShape = new Ammo.btBoxShape(setVector3(1.5, height, size)) const rightMotionState = new Ammo.btDefaultMotionState(wallRightTransform) const rightInfo = new Ammo.btRigidBodyConstructionInfo(0, rightMotionState, wallRightShape, localInertia) const rightBody = new Ammo.btRigidBody(rightInfo) @@ -412,8 +412,8 @@ const addBoxToWorld = (size, height) => { const wallLeftTransform = new Ammo.btTransform() wallLeftTransform.setIdentity() - wallLeftTransform.setOrigin(setVector3((size * aspect / 2) + .5, 0, 0)) - const wallLeftShape = new Ammo.btBoxShape(setVector3(1, height, size)) + wallLeftTransform.setOrigin(setVector3((size * aspect / 2), 0, 0)) + const wallLeftShape = new Ammo.btBoxShape(setVector3(1.5, height, size)) const leftMotionState = new Ammo.btDefaultMotionState(wallLeftTransform) const leftInfo = new Ammo.btRigidBodyConstructionInfo(0, leftMotionState, wallLeftShape, localInertia) const leftBody = new Ammo.btRigidBody(leftInfo)