---
title: "setLocalTransform(_:forTime:)"
framework: modelio
role: symbol
role_heading: Instance Method
path: "modelio/mdltransformcomponent/setlocaltransform(_:fortime:)"
---

# setLocalTransform(_:forTime:)

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

## Declaration

```swift
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

Discussion Calling this method updates the minimumTime and maximumTime properties to reflect the range of sample values stored in the transform component.

## See Also

### Working with Animated Transforms

- [minimumTime](modelio/mdltransformcomponent/minimumtime.md)
- [maximumTime](modelio/mdltransformcomponent/maximumtime.md)
- [localTransform(atTime:)](modelio/mdltransformcomponent/localtransform(attime:).md)
