<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/location(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSEvent(im)locationInNode:"
  },
  "title" : "location(in:)"
}
-->

# location(in:)

Returns the location of the receiver in the coordinate system of the given node.

```
func location(in node: SKNode) -> CGPoint
```

## Parameters

`node`

A node that is a descendant of a scene presented in the window that received the mouse event.

## Return Value

The location of the event in the node’s coordinate system.

---

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)