<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLTransformComponent/setLocalTransform(_:forTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(pl)MDLTransformComponent(im)setLocalTransform:forTime:"
  },
  "title" : "setLocalTransform(_:forTime:)"
}
-->

# setLocalTransform(_:forTime:)

Sets a new local transform matrix for the specified time sample.

```
optional func setLocalTransform(_ transform: matrix_float4x4, forTime time: TimeInterval)
```

## Parameters

`transform`

The local transformation matrix for the specified time sample.

`time`

The time sample with which to associate transform information.

## Discussion

Calling this method updates the [`minimumTime`](/documentation/ModelIO/MDLTransformComponent/minimumTime) and [`maximumTime`](/documentation/ModelIO/MDLTransformComponent/maximumTime) properties to reflect the range of sample values stored in the transform component.

---

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)