Skip to main content

<pc-rigidbody>

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

note

Attributes

AttributeDescription
angular-dampingThe angular damping of the rigidbody. If not specified, 0 is used.
angular-factorThe angular factor of the rigidbody. Specified as a space-separated list of X, Y, and Z values. If not specified, 1 1 1 is used.
frictionThe friction of the rigidbody. If not specified, 0.5 is used.
linear-dampingThe linear damping of the rigidbody. If not specified, 0 is used.
linear-factorThe linear factor of the rigidbody. Specified as a space-separated list of X, Y, and Z values. If not specified, 1 1 1 is used.
massThe mass of the rigidbody. If not specified, 1 is used.
restitutionThe restitution of the rigidbody. If not specified, 0 is used.
rolling-frictionThe rolling friction of the rigidbody. If not specified, 0 is used.
typeThe type of rigidbody component. Can be static, kinematic or dynamic.

Example

JavaScript Interface

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