Appearance
Collisions â
By default every mesh in the scene is used for player collision detection.
Large scenes with 2 million triangles and thousands of objects are usually checked within 0-1ms. You can disable collisions for an object in the editor or with:
js
object.collider = false;Player collision will prevent a play from moving through walls, obstacles and make the player fall when there is no floor. All player collisions are independent of physics, so if you need physics collisions, it's avised to crate a capsule/box/sphere collider and sync that with the player mesh.
Raycasting â
Uva provides an accelerated raycaster which is typically 1000x faster than three's default one. By default each frame you can get the mouse, or VR controllers raycasted intersections using:
js
const currentIntersection = controls.intersections;if you want to create a custom raycaster for something non standard:
js
const raycaster = new world.Raycaster();
const intersections = raycaster.closestIntersection(
objectsList,
frustumCull,
cache
);