Currently, I am working with Three.js and have a situation where there are cubes inside a box. The Transform Control is being used to manipulate the position of the cubes within the box using the mouse. My goal is to implement raycasting to detect collisions. Is there a way to prevent the transform controller from moving the cubes if a collision occurs, specifically when it hits a wall? For reference, my Three.js version is r81.
UPDATE: I've managed to restrict the movement of the cubes within the room by using the size of the space. This method has been effective so far. However, I am wondering if cannon.js can be utilized solely for collision detection without incorporating momentum, gravity, or other features. My aim is to only check for collisions and halt movement upon impact.