Skip to main content

Physics

Namespace

Namespace in the Lens Scripting API.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Enumerations

EnumerationDescription
ConstraintTypeConstraint type used by a Constraint. See also: Constraint, ConstraintComponent.
ForceModeType of force to use when applying force or torque to a BodyComponent.
HingeMotorTypeEnum that defines motor type.

Classes

ClassDescription
ConstraintConstraints body motion in configurable ways, for simulating physical objects such as joints and hinges.
FilterScript interface for applying collision filtering to colliders and ray/shape-casts.
FixedConstraintFully constrain rotation and translation.
HingeConstraintConstraints translation and a single axis of rotation. See also: ConstraintComponent.
HingeLimitSettingsSettings that describe how the position of the object should be limited in respect to the applied forces.
HingeMotorSettingsSettings describing the independent force (motor) applied to the constraint. Motor within a hinge constraint is used to create controlled, powered movement along the hinge's axis, allowing objects to rotate automatically or maintain a particular speed or position.
PointConstraintA type of constraint that only allows rotation. See also: ConstraintComponent.
WorldSettingsAssetStores reusable settings for a Physics WorldComponent such as gravity magnitude and direction.

Functions

FunctionDescription
createGlobalProbeCreate an intersection probe that spans all worlds.
createRootProbeCreate an intersection probe for the implicit root world.
getRootWorldSettingsGet settings that apply to the implicit root world.