How do I fix my mini golf physics?

0 favourites
  • 3 posts
From the Asset Store
**************** Golf kart game sprite *****************
  • I'm working on a low-res physics game based on mini golf (though taking a completely different approach to golf with the final version).

    I've played the excellent 16 Greens (https://www.lexaloffle.com/bbs/?tid=39406) and want to replicate the ball physics with mine.

    The problem i'm having is that whichever ball/wall physics config I choose... the ball always ends up 'hugging' or sticking to the wall at low speeds and doesn't rebound properly?

    Am I missing something? Here's a capx if anyone has time to look, i'd be very grateful.

    dropbox.com/s/ibtc4ys39q2tjj8/ball_help_needed.c3p

    Thanks in advance

  • gamedev.stackexchange.com/questions/98851/body-lost-a-velocity-component-when-hitting-a-wall

    Basically there may or may not be box2d properties we are not able to access to fix this.

    But the gist of it is that this likely happens when you have very very small values, which probably are occurring because you have very very small sprites. Based on solution 3 suggested by NauticalMile on that page, it sounds like there are two things you can do to try to improve the situation. You can either size up your assets by a lot (and scale them back down again later) to trick the box2d library into thinking its working with higher speeds (more pixels/second), or you can simply increase the speed and forces you are applying on everything, and then lower the timescale.

    I would try scaling everything up by size first, as the second option would affect the actual distance your ball travels without tweaking, since you do expect your ball to eventually come to a stop, unlike in a breakout clone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for replying... that certainly seems to match the situation I find myself in.

    I've just tried scaling the ball and walls etc. x 10, then resizing them and am still getting the same results.

    Are you suggesting I start with a new layout size etc and scale the elements to meet my low-res look?

    It might be that I can't achieve what I need with this quirk in place.

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