-
Notifications
You must be signed in to change notification settings - Fork 5
Component Rigidbody
Berke edited this page Jun 23, 2026
·
1 revision
The Rigidbody component provides physics-based movement, forces, and simulation control for entities.
rb.isValidReturns whether the rigidbody is valid.
booleanrb.isStaticDefines whether the rigidbody is static (immovable).
booleanrb.isStatic = truerb.massMass of the rigidbody.
numberrb.mass = 10.0rb.gravityScaleMultiplier for gravity affecting this body.
numberrb.frictionSurface friction coefficient.
numberrb.velocityCurrent linear velocity.
Vector3rb.velocity = Vector3(0, 10, 0)rb:addVelocity(velocity)Adds velocity to the current rigidbody motion.
| Name | Type | Description |
|---|---|---|
| velocity | Vector3 | Velocity to add |
nilrb:addVelocity(Vector3(1, 0, 0))local rb = entity.rigidbody
rb.mass = 5
rb.gravityScale = 1
rb.velocity = Vector3(0, 5, 0)
rb:addVelocity(Vector3(1, 0, 0))