<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNNode/convertVector(_:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNNode(im)convertVector:fromNode:"
  },
  "title" : "convertVector(_:from:)"
}
-->

# convertVector(_:from:)

Converts a direction vector to the node’s local coordinate space from that of another node.

```
func convertVector(_ vector: SCNVector3, from node: SCNNode?) -> SCNVector3
```

## Parameters

`vector`

A direction vector in the local coordinate space defined by the other node.

`node`

Another node in the same scene graph as the node, or `nil` to convert from the scene’s world coordinate space.

## Return Value

A direction vector in the node’s local coordinate space.

## Discussion

Unlike the [`convertPosition(_:from:)`](/documentation/SceneKit/SCNNode/convertPosition(_:from:)) method, this method ignores the translational aspect of both nodes’ transforms. As such, this method is more appropriate for use with vectors that represent only directional information, such as velocity or facing.

## See Also

[`simdConvertVector(_:from:)`](/documentation/SceneKit/SCNNode/simdConvertVector(_:from:))

Converts a direction vector to the node’s local coordinate space from that of another node.



---

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)