Contents

generate(staticFriction:dynamicFriction:restitution:)

Creates a new material with the specified static friction, dynamic friction, and restitution.

Declaration

@MainActor @preconcurrency static func generate(staticFriction: Float, dynamicFriction: Float, restitution: Float) -> PhysicsMaterialResource

Parameters

  • staticFriction:

    The static (stationary) friction coefficient in the range [0, ∞).

  • dynamicFriction:

    The dynamic (moving) friction coefficient in the range [0, ∞).

  • restitution:

    The coefficient of restitution (bounciness) in the range [0, 1].

See Also

Creating a custom material resource