Collision when the button is pressed

Cocos2d-x C++ Physics
  • nightrobin
    Likes 0

    Problem Description

    Good day,

    What is the workaround if I want my physics bodies to pass each other but only have collisions when I press a button?

    I read that onContactPreSolve and onContactPostSolve will not be invoked when onContactBegin return false.


  • Sonar Systems admin
    Likes 0

    Collision as in physics

  • nightrobin
    Likes 0

    yes, as in physics.

  • Sonar Systems admin
    Likes 0

    Try detaching the physics body.

Login to reply