我正在像这样创建我的播放器:
UIBezierPath *pPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(0, 0)
radius:10
startAngle:0
endAngle:DEGREES_TO_RADIANS(360)
clockwise:YES];
_player = [[SKShapeNode alloc] init];
_player.path = pPath.CGPath;
[_player setFillColor:[UIColor blueColor]];
[_player setStrokeColor:[UIColor clearColor]];
_player.position = arenaCentre;
_player.zPosition = 1;
_player.name = @"player";
然后我使用以下方法检测对该对象的触摸:
SKSpriteNode *touchedNode = (SKSpriteNode *)[self nodeAtPoint:touchLocation];
问题是我的形状太小/太快,有时无法触摸。如何使触摸区域大于可见对象?
这种事情有最佳实践吗?
非常感谢,伊恩