Convert UIKit coordinates to SpriteKit coordinates

前端 未结 1 841
野趣味
野趣味 2021-01-13 02:03

I am trying to convert normal uikit coordinates (top left origin, width and height go right and down) to Sprite Kit coordinates (origin is at center of node, left and down a

相关标签:
1条回答
  • 2021-01-13 02:21

    According to the docs, SKView has methods for Converting Between View and Scene Coordinates.

    Remember the scene is itself an SKNode, so if you need to get from scene coordinates to a particular node coordinate system there's also the methods in Converting to and from the Node’s Coordinate System.

    0 讨论(0)
提交回复
热议问题