0 Favourites

How do I keep ball from hanging off edge?

  • In my game you have to roll a ball around on disks. If you are not 'overlapping' a disk you fall off. I'm having trouble trying to get the overlap correct.

    As you can see in the image, the ball will hang onto the outer edge of the disks. This looks wonky. The ball should fall off if it hangs off the edge more than half its width.

    I have tried the 'overlapping at offset' to try and get the ball onto the disks more but then the ball will fall through the outer edges of the disks. As if it is dissolving through them. Again, that looks wonky.

    The disks have bullet behavior only. Physics slows everything down too much, and solid pushes the ball off the disks automatically. The ball itself has 8 direction.

    If anyone knows some tips on how to get this right, it would be greatly appreciated.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You could always add another object on top of your initial object as a falloff check, Invisible to players. So you don't get the overlap Issue, Something like this

    Hope this helps!

    Good luck with your project

  • Brandon12hummer Thanks for the reply.

    I was thinking about doing it kinda like that, but with the disks. Creating a round circle a few pixels larger than the disks on a lower platform with solid behavior.

    Than if ball is offset from the disks, enable solid behavior on the circles.

    But that's too many events. The disks themselves have a lot of evets/actions. Creating, movements....etc.etc

    I'll try your way first, since it should only take a few events/actions.

    Again, thank you for the reply.

  • Brandon12hummer

    A big thank you, brother. Used your method, just cloned the ball > resized to half > pinned. Works perfectly!

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