Instance Method

convert(_:from:)

Converts a point from the coordinate system of another node in the node tree to the coordinate system of this node.

Declaration

func convert(_ point: CGPoint, from node: SKNode) -> CGPoint

Parameters

point

A point in the other node’s coordinate system.

node

Another node in the same node tree as this node.

Return Value

The same point converted to this node’s coordinate system.

See Also

Converting Between Coordinate Systems of Different Nodes

Converting Coordinate Spaces

Convert positions across the various coordinate spaces in a scene.

func convert(CGPoint, to: SKNode) -> CGPoint

Converts a point in this node’s coordinate system to the coordinate system of another node in the node tree.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software