Skip to main content

<pc-rigidbody>

The <pc-rigidbody> tag is used to define a rigidbody component.

Usage

Attributes

AttributeTypeDefaultDescription
angular-dampingNumber"0"Angular velocity damping factor
angular-factorVector3"1 1 1"Angular movement constraints as "X Y Z" values
enabledBoolean"true"Enabled state of the component
frictionNumber"0.5"Surface friction coefficient
linear-dampingNumber"0"Linear velocity damping factor
linear-factorVector3"1 1 1"Linear movement constraints as "X Y Z" values
massNumber"1"Mass of the rigidbody in kilograms
restitutionNumber"0"Bounce/elasticity coefficient (0-1)
rolling-frictionNumber"0"Rolling resistance coefficient
typeEnum"static"Physics body type: "static" | "kinematic" | "dynamic"

Example

JavaScript Interface

You can programmatically create and manipulate <pc-rigidbody> elements using the RigidBodyComponentElement API.