Bounce Bug

I notice that when an actor bounces off another object (in this case, let's call it a wall) when both the velocity and the the angle difference are small, the object fails to bounce and instead "sticks" to the wall, sliding along it. Attached is a simple demo showing this. I've played around with the physics, but nothing seems to help. Notice how simply turning on either of the two other change velocity behaviors instead of the first one for the ball actor makes it bounce correctly (just small changes in angle or velocity).

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Yep, GameSalad's physics can get strange in situations like this, try Direction 180 + Speed 50 for a truly bizarre sight ! :) You are coming in perpendicular to the wall yet you still don't bounce !

  • SocksSocks London, UK.Member Posts: 12,822

    You might need to conjure up your own physics / bounce maths, I expect it's not too complex - basically when A collides with B change A's X and Y linear velocity to the relevant values.

  • RainbrosRainbros Member Posts: 124

    Considering that Gamesalad is supposed to be ready to go for physics, it's pretty unacceptable that simple bounces don't work properly.
    @CodeWizard @BlackCloakGS
    Can somebody look into this? I submitted a bug report.
    http://bugs.gamesalad.com/show_bug.cgi?id=1513

  • RainbrosRainbros Member Posts: 124
    edited December 2015

    @Socks That might be easy enough for one moving object, but what about something like a billiards game (and with arbitrarily angled walls, so you can't just reverse the x or y velocity)? Seems like it would get fairly complex, since you need to access the information for the wall itself for every collision. If you wouldn't mind making a demo, I'd love to see it :)

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2015

    @Rainbros said:
    @Socks That might be easy enough for one moving object, but what about something like a billiards game (and with arbitrarily angled walls, so you can't just reverse the x or y velocity)?

    The idea would be to create a bounce system the particular project, rather than create a system that covers single and multiple moving objects, billiards dynamics, arbitrarily angled walls (etc etc).

    @Rainbros said:
    Seems like it would get fairly complex, since you need to access the information for the wall itself for every collision . .

    Not necessarily, you'd need to get a little creative, for example we know that objects colliding with a wall that are moving slower than X/pixels per second will stick to the wall and slide along it in the direction of movement, you can use this to determine the angle of that wall, and use that information to send to actor on its way in the right direction.

Sign In or Register to comment.