Page 1 of 1

Problem with Collision Angles

Posted: Mon Nov 08, 2010 4:12 pm
by FloodWalk
So I'm working on my first love game, a sling-shot kinda game using the love.physics. I've ran into a problem with getting correct collisions results from objects.
Whenever the shot hits a wall the resulting collision angle isn't correct. IE it will hit the wall with in incoming angle of say 10 degrees from the perpendicular of the wall and leave with an angle of 0 degrees, aka perpendicular to the wall, instead of -10 degrees.

I found a few hits about this on the box2d forums but couldn't find any concrete answer. Any help would be appreciated ^^

Re: Problem with Collision Angles

Posted: Mon Nov 08, 2010 6:09 pm
by Robin
Odd. Could you give us a .love? That usually helps. ;)

Re: Problem with Collision Angles

Posted: Mon Nov 08, 2010 8:10 pm
by FloodWalk
Sure, here's the basic concept.

Re: Problem with Collision Angles

Posted: Mon Nov 08, 2010 8:21 pm
by Robin
It doesn't run for me: assertion failed. Not sure why exactly.

Re: Problem with Collision Angles

Posted: Mon Nov 08, 2010 8:51 pm
by TechnoCat
I have a feeling it has to do with restitution.
On second thought, I meant friction.
Or both, I don't know.

Re: Problem with Collision Angles

Posted: Mon Nov 08, 2010 11:39 pm
by FloodWalk
...grr. I feel like a moron :roll:
Thanks technocat.
Robin wrote:It doesn't run for me: assertion failed. Not sure why exactly.
Linux? Mac? Windows?

Re: Problem with Collision Angles

Posted: Tue Nov 09, 2010 4:48 pm
by Robin
Linux. But it failed due some Box2D problem, as usually is the case when an assertion fails. Unfortunately, the error messages you get are never very helpful.