sprite kit - SpriteKit SKNode visual position in parent(s) after parent(s) are rotated? -
i have following hierarchy:
scene -> root node -> nodea -> nodeb (anchor node that's rotated) -> nodec
how can figure out visual position of nodec in root node coordinate space?
i've tried several variants convertpoint:tonode: , convertpoint:fromnode: numbers i'm getting don't match.
i've looked @ get visible location of spritekit node after parent rotation, seems close issue, no luck there either.
found missing - converttopoint needs called node in final cgpoint value represented in. so, works:
// point cgpointzero because center of nodec let point = rootnode.convertpoint(cgpointzero, fromnode: nodec) cgpoint!
Comments
Post a Comment