RigidBodyConfig
Defined in: physics/src/types.ts:49
Configuration for creating a rigid body.
Properties
Section titled “Properties”angularDamping?
Section titled “angularDamping?”
optionalangularDamping?:number
Defined in: physics/src/types.ts:58
Angular damping coefficient; finite and >= 0.
optionalccd?:boolean
Defined in: physics/src/types.ts:67
Also sweep this body against kinematic and dynamic colliders, so it stops at them at high speed. Fast bodies are always swept against static ones.
fixedRotation?
Section titled “fixedRotation?”
optionalfixedRotation?:boolean
Defined in: physics/src/types.ts:60
If true, body cannot rotate.
gravityScale?
Section titled “gravityScale?”
optionalgravityScale?:number
Defined in: physics/src/types.ts:62
Gravity multiplier for this body; finite (negative floats the body up).
linearDamping?
Section titled “linearDamping?”
optionallinearDamping?:number
Defined in: physics/src/types.ts:56
Linear damping coefficient; finite and >= 0.
lockTranslationX?
Section titled “lockTranslationX?”
optionallockTranslationX?:boolean
Defined in: physics/src/types.ts:69
If true, disable translation on the X axis.
lockTranslationY?
Section titled “lockTranslationY?”
optionallockTranslationY?:boolean
Defined in: physics/src/types.ts:71
If true, disable translation on the Y axis.
syncRotation?
Section titled “syncRotation?”
optionalsyncRotation?:boolean
Defined in: physics/src/types.ts:73
If false, physics will not write rotation back to Transform. Default: true.
type:
BodyType
Defined in: physics/src/types.ts:54
Body type: dynamic, static, or kinematic. RigidBodyComponent.setType
changes it at runtime.
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/physics.md.