<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicsMaterialResource/generate(friction:restitution:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicsMaterialResourceC8generate8friction11restitutionACSf_SftFZ"
  },
  "title" : "generate(friction:restitution:)"
}
-->

# generate(friction:restitution:)

Generates a new material with the given characteristics.

```
@MainActor @preconcurrency static func generate(friction: Float = 0.8, restitution: Float = 0.8) -> PhysicsMaterialResource
```

## Parameters

`friction`

The coefficient of friction, in the range `[0, infinity)`.

`restitution`

The coefficient of restitution, in the range `[0, 1]`.
Use values at the high end of the range to indicate materials that
experience elastic collisions, meaning that objects bounce off each
other and kinetic energy is conserved after a collision. Use low values
to indicate materials that lose kinetic energy when they collide.

## Return Value

A physics material resource.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)