Restrict an object to another?

I have a wall plane and I need to be able to add a door to this wall plane that can be moved but will not move outside the wall. It also needs to be restricted to be at the bottom of the plane. Can anyone show me a brief code sample or point to one that will teach me the proper functions for this? Thanks in advance.

Actually, creativity is up to you :wink:

Here is a very rough concept, based on THREE.Raycaster() and THREE.ExtrudeGeometry().
https://jsfiddle.net/prisoner849/L7njaghm/

PierceIt

1 Like

Perfect prisoner849! Thank you very much!