Action FlipX cause physic collision

Action FlipX cause physic collision
0.0 0



I’m searching for a way to avoid the collision triggered by flipping a node.

let flipXAction = cc.flipX(true);

When this is executed, if my player is inside a collider, the collision is triggered for a second time. I tried setting a temp variable (isFlipping) to skip the second collision, it works ok except in the case where i have 2 colliders for one node.

I’m wondering if there is a way to simply not trigger the collision.


Another weird behavior of flipping a physic body: if the body has 2 physics colliders, it causes a Assertion Failed error! So there is no way to have 2 physics collider on a node and flip it.

It seems the flip action recreate the physics collider.

I tried to disabled the physic collider but that only work once.

are there constraints concerning runAction and physics colliders that I should be aware of?