2013-10-03 40 views
0

所以我有移動在每個方向一個精靈和相機遵循使用此代碼Cocos2d獲取當前中心位置的屏幕?

[self runAction:[CCFollow actionWithTarget:(_cars) worldBoundary:_trackssss.boundingBox]]; 

精靈,我需要得到屏幕或照相機位置XYZ的當前中心位置....

請問您可以告訴我如何完成這項工作?

回答

0

如果我的理解沒錯,這是你在找什麼for.-

CGPoint center = CGPointMake(self.contentSize.width/2, self.contentSize.height/2);