Function createPhysicsBody
-
createPhysicsBody(
world: PhysicsWorld,
node: SceneNode,
motionType: PhysicsMotionType,
startsAsleep?: boolean,
): PhysicsBodyParameters
- world: PhysicsWorld
The physics world.
- node: SceneNode
The scene node the body follows / drives.
- motionType: PhysicsMotionType
Whether the body is static, animated (kinematic), or dynamic.
- startsAsleep: boolean = false
When true, the body is added in a sleeping state.
Returns PhysicsBody
The created physics body handle.
- world: PhysicsWorld
Creates a rigid body bound to a scene node, adds it to the world, and seeds it with the node's transform.