Class: ColissionBoxBuilder

ColissionBoxBuilder()

Helper class to build a collision box (AABB).

Constructor

new ColissionBoxBuilder()

Source:

Methods

(async) loadBox(x, y, z, width, height, depth, scene) → {THREE.Box3}

Create a Box for collision detection with manual parameters. For static objects only.
Parameters:
Name Type Default Description
x Number
y Number
z Number
width Number
height Number
depth Number
scene THREE.Scene null Add scene for debugging only
Source:
Returns:
Type
THREE.Box3

(async) loadBoxFromObj(obj, scene) → {THREE.Box3}

Create a Box for collision detection from a given object in the world. For static objects only.
Parameters:
Name Type Default Description
obj THREE.MESH
scene THREE.Scene null Add scene for debugging only
Source:
Returns:
Type
THREE.Box3