I have a ball that triggers an action when it collides with a sprite. Then after the action is finished it resets it’s position with
-(void)removeBall
{
[self stopAllActions];
_ballBody->SetTransform(b2Vec2(10, 2), 0);
}
But, [self stopAllActions] doesn’t stop the action. How can I stop the action?
Any ideas?
Thanks
I am using
to constaly check if the ballBody has collided with the other body and using the Accelerometer to move the ballBody. So, to reset the position of the ballBody I just replace the scene, which calls the “dealloc” then starts the scene again.