I am writing a simple Bubbles game using Cocos2d-JS 3.6.1.
From the time I activated Chipmunk and added PhysicsBody to my sprites, they were not able to run any action anymore (using moveTo() and moveBy() ). But they still run perfectly on web and win32.
On alternative is to use applyForce and applyImpulse methods but they are not as flexible as my old methods.
Besides, I had one other problem that may (or not) be related to the first one.
After adding PhysicsBody to my sprites, I wasn’t able to remove them completely from the game using removeFromParent(). The sprites seem to be removed from the screen, but once I activate PhysicsDebugNode, the physicsbody (red shape) is still present in the gamescreen.
Could you please help me with this, is there any solution to my problem ?
I am also interested in moving a physics sprite in my JS game (using Cocos2d-x v3.7) and I know that move actions cannot be applied to physics sprites. Move actions work on web but not on my android device. I found applyImpulse to be the best alternative for my needs but I want to move my sprites a tad bit on the screen so I will have to applyImpulse then apply an impulse again in the opposite direction to stop the physics sprite from moving.
Does anyone know a better alternative method to using MoveBy on a physics sprite?