The code below creates a phantom and provides anchor point and rotation. The phantom will roam a lot, is there a way to find the lower right place of the phantom. Like, sprites anchorpoint (0,1), can I get anchor (location 1)? In this way, I can always get one place of the phantom even though it is rotating?
tempsprite = [CCSprite spriteWithSpriteFrameName: @ "image.png"]; Tempsprite.rotation + = 90; Tempsprite.anchorPoint = CCP (0,1); Tempsprite.position = tempsprite; [Self add cats: tempsprite];
OK, so I have understood that one such issue It's like I did it
integer length = 100; Int offset = 50 cgflot angle = ([self finder + offset] * Mopi / 180; CGPoint startpoint1 = starting point; CGPoint endpoint1 = CGPX (start point 1.x + (sign) * length), start point 1. + + (cof (angle) * length)); Return and point 1;
No comments:
Post a Comment