[SOLVED] physic problem, the player overcomes object

0 favourites
  • 6 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • hi guys, sorry for my bad english, italian is my mothertongue. I' ve a problem with the physic that i can't solve.

    My player (ball) overcomes the object (wall) when i rotate quickly.

  • Hi,

    All the time these kind of things happened to me was to do with bad collision lines, so there are 3 things you can do:

    1) Double check your collision lines to make sure you have PERFECT boxes or circles.

    2) If you are using 5 invisible rectangles for the box collision change it to 2 rectangles: 1 big one and one middle line.

    3) If nothing works consider setting a limit on the speed of the rotation of the box to avoid this problem.

    Good luck

  • Moving stuff by smaller amounts is one way that kind of works. The correct way to solve it is to only move objects with forces or setting velocity. That way the physics behavior can work best. Any time you set a position or angle it is like the object teleport and the physics behavior cannot account for it. As a note, the pin behavior which is likely used here is the same as setting position and angle.

  • Thank you for your reply. Unfortunately, this problem happens to slow speed too. I've modified an existing .capx downloaded from a tutorial. Please, could anyone help me and check this code? Thanks a lot!

    I'm a newbie and I don't know where I'm wrong.

    this is the link to my .capx, i hope it works

    1drv.ms/f/s!AmQI7fBCU3RsaYYlY8BcD1uNC6s

  • This is a (weak) proof of concept that it is (in given simple base example) possible to do it with a rotating Physics object. Just got to do every and any movement with Physics. Or, just stay in the Physics world. Pin dont count as physics, as already pointed out.

    https://www.dropbox.com/s/b4f244k46a58l ... .capx?dl=0

    Then again, if you rotate the world and adjust the angle of gravity, the possibility's are endless. It is just making a switch in the mind and looking at the problem from a different view.

    https://www.dropbox.com/s/y1auwvqi52i24 ... .capx?dl=0

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you so much, you solved a problem that made me lose all night! I didn't know that I could rotate the whole layer instead of using "pin behavior". With your .capx I've learnt that it's possible to invert the gravity too. Wonderful, you have answered to my next question!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)