Class: CapsuleColliderShape
Defined in: src/components/shape/CapsuleColliderShape.ts:7
Capsule collision body. Composed of two hemispheres connected to a cylinder.
Extends
Constructors
Constructor
new CapsuleColliderShape():
CapsuleColliderShape
Defined in: src/components/shape/CapsuleColliderShape.ts:17
Returns
CapsuleColliderShape
Overrides
Properties
radius
radius:
number=2.5
Defined in: src/components/shape/CapsuleColliderShape.ts:11
The radius of the local width of the collision body.
height
height:
number=10
Defined in: src/components/shape/CapsuleColliderShape.ts:15
The total height of the collision body.
Accessors
shapeType
Get Signature
get shapeType():
ColliderShapeType
Defined in: src/components/shape/ColliderShape.ts:41
Returns
Inherited from
center
Get Signature
get center():
Vector3
Defined in: src/components/shape/ColliderShape.ts:60
The position of the collision object in the local space of the object.
Returns
Set Signature
set center(
value):void
Defined in: src/components/shape/ColliderShape.ts:64
Parameters
value
Returns
void
Inherited from
size
Get Signature
get size():
Vector3
Defined in: src/components/shape/ColliderShape.ts:73
The size of the collision body in the X, Y, and Z directions.
Returns
Vector3
Set Signature
set size(
value):void
Defined in: src/components/shape/ColliderShape.ts:77
Parameters
value
Returns
void
Inherited from
halfSize
Get Signature
get halfSize():
Vector3
Defined in: src/components/shape/ColliderShape.ts:85
Half the size of the collision body.
Returns
Inherited from
Methods
setFromCenterAndSize()
setFromCenterAndSize(
ct?,sz?):this
Defined in: src/components/shape/ColliderShape.ts:51
Set the position and size of collision objects
Parameters
ct?
The position of the collision object in the local space of the object.
sz?
The size of the collision body in the X, Y, and Z directions.
Returns
this
Inherited from
ColliderShape.setFromCenterAndSize
rayPick()
rayPick(
ray,fromMatrix):HitInfo
Defined in: src/components/shape/ColliderShape.ts:97
Ray pickup.Emit a ray from a designated location to detect objects colliding with the ray.
Parameters
ray
emit ray
fromMatrix
matrix
Returns
Pick result intersect: whether to collide; IntersectPoint: collision point; Distance: The distance from the origin of the ray to the collision point.

