0
내 게임을 Cocos2d v2에서 v3으로 이식합니다. 스프라이트가 화면 밖으로 나올 때가 언제인지 알 수 없습니다. Cocos2d 3.0 중력을 지닌 다람쥐 : 스프라이트 위치가 변경되지 않습니다.
는 V2에서 내 솔루션이었다 :-(void) update:(ccTime) delta
{
// Should use a fixed size step based on the animation interval.
int steps = 2;
CGFloat dt = [[CCDirector sharedDirector] animationInterval]/(CGFloat)steps;
for(int i=0; i<steps; i++){
cpSpaceStep(space_, dt);
}
if (mySprite.getPhysicsBody->p.y > 500)
[mySprite resetPosition];
}
이제적인 Cocos2D V3 mySprite.physicsNode.position 시간을 통해 변경되지 않습니다와 함께.
어떤 아이디어가 있습니까?
감사합니다.