Instance Method

convert(_:from:)

Converts a point from scene coordinates to view coordinates.

Declaration

func convert(_ point: CGPoint, from scene: SKScene) -> CGPoint

Parameters

point

A point in scene coordinates.

scene

A scene.

Return Value

The same point in the view’s coordinate system.

Discussion

This method performs the coordinate conversion as if the scene is presented inside the view.

See Also

Converting Between View and Scene Coordinates

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

Converts a point from view coordinates to scene coordinates.

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