How to detect collision between camera and bodies

144 views Asked by At

Is there an easy way to make the camera behave like a body so that it can collide with other bodies?

1

There are 1 answers

0
Jos Dirksen On

The camera itself is an Object3D, so you can just add it to a Group or another object (a small THREE.Box) and use the standard way of detecting collisions between the container and the other bodies(e.g using Cannon.js with a Cannon.Box, Physijs or using the THREE.RayCaster).