---
title: "localTransform(atTime:)"
framework: modelio
role: symbol
role_heading: Instance Method
path: "modelio/mdltransformcomponent/localtransform(attime:)"
---

# localTransform(atTime:)

Returns the local transform matrix as of the specified time sample.

## Declaration

```swift
optional func localTransform(atTime time: TimeInterval) -> matrix_float4x4
```

## Parameters

- `time`: The time sample for which to request information.

## Return Value

Return Value The local transformation matrix for the specified time sample.

## Discussion

Discussion This matrix defines the position, orientation, shear, and scale for any object affected by the transform component, relative to the coordinate space of its parent, as of the specified time sample. Requesting a sample outside the time range clamps returned values using the minimumTime and maximumTime properties. Some asset formats support continuous sampling, with interpolation for times between the samples stored in the asset; others are discrete. For an asset with discrete time information, requesting a sample time in between the samples stored in the asset returns data for the immediately preceding time.

## See Also

### Working with Animated Transforms

- [minimumTime](modelio/mdltransformcomponent/minimumtime.md)
- [maximumTime](modelio/mdltransformcomponent/maximumtime.md)
- [setLocalTransform(_:forTime:)](modelio/mdltransformcomponent/setlocaltransform(_:fortime:).md)
