Problem with collisions

monkeedmonkeed Member Posts: 22
edited April 2012 in Working with GS (Mac)
I'm making a mini golf type game. I'm having some issues with collisions on the walls.
Basically what happens is when the ball hits the wall at a narrow angle and the ball is moving slowing, the ball slides along the wall instead of bouncing off.

I've tried various restitution settings for both the wall and the ball, but I've had no luck. Any ideas?

Best Answer

  • tenrdrmertenrdrmer Posts: 9,934
    Accepted Answer
    thats one of the things with the physics. sometimes if the collision angle is to small it doesn't bounce off at all. Look into the block breaker demo in GS. They have some rules in there to force the ball away from the edge when it gets stuck like that but honestly im not sure if it will work for your style game. It should give you some ideas for a workaround though.

    Good Luck

Answers

  • monkeedmonkeed Member Posts: 22
    Thanks, I'll take a look at it.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I will also try to dig up an old thread that claimed you could get perfect realistic collisions using a bunch of math. Its been a while though so im not sure I will have any luck.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    http://forums.gamesalad.com/discussion/comment/261536#Comment_261536

    Gah, Yes @Tshirtbooth That is the thread as well as what i'm posting. Same one. not sure why the links are different. But on a side positive note. The search on the site works pretty well. it only took me about 10 mins to dig this baby up.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    edited April 2012
    Yeah that one is going into my bookmarks for sure.

    Edit:
    Well actually if I had not been a retard and checked my bookmarks it was already there. LOL

    Oh well at least I know for sure the forums search is better than it has ever been. :)
  • monkeedmonkeed Member Posts: 22
    Thanks guys, much appreciated
Sign In or Register to comment.