objective c - sprite kit physicsBody around circles -
so guy , girls got sprite , wounding how create circle physics body around it. maybe using alpha.
what have ball.physicsbody = [skphysicsbody bodywithrectangleofsize:ball.size];
bodywithrectangleofsize puts square on sprite right?
to create circular physics body can either use:
mynode.physicsbody = [skphysicsbody bodywithcircleofradius:10.0];
or
mynode.physicsbody = [skphysicsbody bodywithcircleofradius:10 center:cgpointmake(0, 0)];
you specify center if looking physics body have offset node's center.
Comments
Post a Comment