0
所以我有移动在每个方向一个精灵和相机遵循使用此代码Cocos2d获取当前中心位置的屏幕?
[self runAction:[CCFollow actionWithTarget:(_cars) worldBoundary:_trackssss.boundingBox]];
精灵,我需要得到屏幕或照相机位置XYZ的当前中心位置....
请问您可以告诉我如何完成这项工作?
所以我有移动在每个方向一个精灵和相机遵循使用此代码Cocos2d获取当前中心位置的屏幕?
[self runAction:[CCFollow actionWithTarget:(_cars) worldBoundary:_trackssss.boundingBox]];
精灵,我需要得到屏幕或照相机位置XYZ的当前中心位置....
请问您可以告诉我如何完成这项工作?
如果我的理解没错,这是你在找什么for.-
CGPoint center = CGPointMake(self.contentSize.width/2, self.contentSize.height/2);