Reputation: 21
This is a one liner, I went through documentation couldn't find anything as new capsule. I get the gist of it, it creates a new capsule but what exactly are the inputs to it? Can anyone please explain?
const playerCollider = new Capsule( new THREE.Vector3( 0, 30, 0 ), new THREE.Vector3( 0, 11, 0 ), 5 );
Upvotes: 1
Views: 212
Reputation: 31026
Capsule
is an experimental class in the examples
directory and a simple form of a collider. It is made of two half-spheres joined together by a cylinder.
The ctor of the class has three parameters:start
, end
and radius
. The first two define the height of the capsule whereas the last one defines the extrusion of the capsule at the start and end.
Upvotes: 4