Contents

init(shapes:mass:material:mode:)

Creates a physics body component deriving mass properties from shape and mass.

Declaration

@MainActor @preconcurrency init(shapes: [ShapeResource], mass: Float, material: PhysicsMaterialResource? = nil, mode: PhysicsBodyMode = .dynamic)

Parameters

  • shapes:

    The shape for which to estimate the rotational inertia and center of mass.

  • mass:

    The mass of the object in kilograms.

  • material:

    The material properties, like friction.

  • mode:

    The simulation mode that indicates how a body responds to forces.

See Also

Creating a physics body component