obstacle avoidance

This commit is contained in:
2025-10-17 19:03:31 +03:00
parent 0018d513eb
commit 1dd2685762
3 changed files with 51 additions and 20 deletions
@@ -79,11 +79,11 @@ class MazeObject {
)
left.rigidBody.setRotation(quat, true)
// let right = engine.phy.add(
// {position: room.localToWorld(new Vector3(-context.tubeSize / 2, 0.6, offsetZ/2))},
// 'fixed', false, undefined, 'cuboid',{ width: 0.01, height:1, depth:offsetZ/2 }
// )
// right.rigidBody.setRotation(quat, true)
let right = engine.phy.add(
{position: room.localToWorld(new Vector3(-context.tubeSize / 2, 0.6, offsetZ/2))},
'fixed', false, undefined, 'cuboid',{ width: 0.01, height:1, depth:offsetZ/2 }
)
right.rigidBody.setRotation(quat, true)
if (def.type == 'area') {