SpriteKit:不可能使用各种 parents 的交集?

SpriteKit: Using intersection by various parents impossible?

同一个parents使用交集很容易,像这样:

 if a.frame.intersects(b.frame) {
         print ("yes!")
 } else {
         print ("no!")
 }

我的问题是节点有不同 parents。我怎么能在这里得到相同的结果?有人可以帮忙吗?

您需要将框架从给定子节点转换为其公共父节点。也许这可以帮助你 https://developer.apple.com/documentation/spritekit/sknode/converting_coordinate_spaces.