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
Problem with Collision Angles
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Problem with Collision Angles
Odd. Could you give us a .love? That usually helps.
Help us help you: attach a .love.
Re: Problem with Collision Angles
Sure, here's the basic concept.
- Attachments
-
- angleSS.love
- (1.79 KiB) Downloaded 204 times
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Problem with Collision Angles
It doesn't run for me: assertion failed. Not sure why exactly.
Help us help you: attach a .love.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Problem with Collision Angles
I have a feeling it has to do with restitution.
On second thought, I meant friction.
Or both, I don't know.
On second thought, I meant friction.
Or both, I don't know.
Re: Problem with Collision Angles
...grr. I feel like a moron
Thanks technocat.
Thanks technocat.
Linux? Mac? Windows?Robin wrote:It doesn't run for me: assertion failed. Not sure why exactly.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Problem with Collision Angles
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.
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests