<!--
{
  "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/HasTransform/look(at:from:upVector:relativeTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12HasTransformPAAE4look2at4from8upVector10relativeToys5SIMD3VySfG_A2kA6EntityCSgtF"
  },
  "title" : "look(at:from:upVector:relativeTo:)"
}
-->

# look(at:from:upVector:relativeTo:)

Positions and orients the entity to look at a target from a given
position.

```
@MainActor @preconcurrency func look(at target: SIMD3<Float>, from position: SIMD3<Float>, upVector: SIMD3<Float> = SIMD3<Float>(0, 1, 0), relativeTo referenceEntity: Entity?)
```

## Parameters

`target`

The target position to look at.

`position`

The new position of the entity.

`upVector`

The up direction of the entity after moving.

`referenceEntity`

The entity that defines a frame of reference. Set this to
`nil` to indicate world space.

## Discussion

You can use this method on any entity, but it’s particularly useful for
orienting cameras and lights to aim at a particular point in space.

---

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)