Problem with physics in Cocos2d-x

  • CeeNE92
    Likes 0

    Problem Description
    Hello i have a problem with physics in cocos2d-x c++. I need to have a draggable sprite with physics body. If this sprite is moving by self there is no problem but when i drag the sprite, it not collide well with other moving objects. I drag the sprite by PhysicsJointSpring. I mean a small ball is penetrate a platform who falling down. The platforms are falling by set a velocity on their physics body.
     

  • Sonar Systems admin
    Likes 0

    Could you show us a video of the problem

  • CeeNE92
    Likes 0

    i want to make a platform are impenetrable

     
  • Sonar Systems admin
    Likes 0


  • CeeNE92
    Likes 0

    its the same problem like mine but i can’t see solution :(

  • Sonar Systems admin
    Likes 0

    We have had this issue, it seemed like the refresh of the physics was to slow for the movement.

     

    Try detecting when collision has occured and manually set the position so it’s always on the outside.

  • CeeNE92
    Likes 0

    It’s possible? I dont know how deep the ball penetrate the platform

  • Sonar Systems admin
    Likes 0

    Yh it should be, you can detect collisions using Cocos2d-x then move it outside

Login to reply