Did I break the physics engine or is it my code? :(

8x8n88x8n8 Member Posts: 79

So I got this sadface man bad guy rolling back and forth and colliding with stuff quite successfully. The player is meant to bop around and jump off the sadface guy to get to the first platform. But if too much goes on he gets stuck. In this pic he is stuck between the wall and the brick, but sometimes he just gets stuck on the wall or just the brick and doesn't reboot.

I tried to get him to reboot with some exception code where if linearvelocityx goes to 0 a simple variable change gets triggered to get him rolling again. But even that doesn't get him going again I am not sure how to QA this better. Anyone who wants to help is invited, thanks.



Comments

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,179

    Not sure cause I haven't played with the physics toggles in a while, but

    1) are you using circular collision shape or a custom shape?

    2) before getting it moving again, adjust it's position. it might be embedded in the wall or floor.

    3) try turning on better collisions (it's more processor intensive, but avoid issues where the items pass through one another).

Sign In or Register to comment.