How do I bind a platform object to the ground?

0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi everybody

    I'm building a game where a ball "rolls" on platforms. When it meets a wall, you can roll on that wall, then on the roof,etc. I'm using the platform behavior, mainly because it allows me to check if there's a wall, which is perfect for my game. You can see how i did it in the capX linked to this topic.

    My main problem is, since i use the platform behavior, my ball falls instead of staying on the ground. i kind of managed the problem by changing the gravity angle when the ball is falling, but it isn't smooth at all, and if you keep pressing two directions at the same time, the ball just randomly flies off somewhere.

    Do you know a way of binding the ball to the ground? I already tried using the 8 direction behavior for moving, but the ball doesn't roll on the soft edges anymore.

    I tried to pin the ball (rope style) to the platform, but it just pins it to the first platform sprite i used. If i pin it to a tileset, it pins to the origin of the tileset, which isn't better.

    I tried a lot of things, but i'm sure there's something i missed.

    Thanks in advance for your help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if i understand you trying to simulate physics with the platform behavior i suggest you use physics behavior for that take a look at the manual

    you will need then to play with gravity and mass with some calculations around the ball position

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