Skip to content

Documentation / scene / createSphereCollider

Function: createSphereCollider() ​

createSphereCollider(centerOrOffset, radius, node?): SphereCollider

Defined in: libs/scene/src/animation/spring/spring_collider.ts:86

Creates a sphere collider

Parameters ​

centerOrOffset ​

Vector3

Center position in world space, or local offset if node is provided

radius ​

number

Radius of the sphere

node? ​

SceneNode

Optional scene node to attach to (if provided, centerOrOffset is treated as local offset)

Returns ​

SphereCollider

Released under the MIT License.