To test any simple method, whether an SKFixBode is completely another ?
There is every point of bodyA
in bodyB
, or anything like that.
Some 2D mathematical assistants have additional "meta" - a node or CGPAID associated with something.
There is no direct method, but something you can find useful if your body is rectangular and your If it matches the frame of the nodes, then it is possible that it is trying:
BOOL isContained = CGRectContainsRect (bodyA.node.frame, bodyB.node.frame); // bodyA is the container, check for the end of bodybie
If your body is completely polygon made with arbitrary routes, then finding one's control is a complex task is. This is a long shot, but you can get some initial approximation using the above method combined with There is also a SKPhysicsWorld method that comes near: CGPathGetBoundingBox
- which will return the rectangle around your polygon, so that you can check for overlapping (Required as CGRectInset
).
- (SKPhysicsBody *) bodyInRect: (CGRect) rect
, yet it only gives an SKPhysicsBody that intersects a rectangular
Comments
Post a Comment