Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2d collision response help

Author
Message
guitaral
15
Years of Service
User Offline
Joined: 30th Jun 2008
Location:
Posted: 1st Jul 2008 00:10
Hey guys, this is me first post here! I've been working on this collision detection and response program for the last day or so using line to point tangents, but sometimes the character gets stuck (very rarely, though). Can any of you suggest anything to fix this? Here's the code:



can anybody help out?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Jul 2008 02:38
Without running the code, my first guess is a precision issue.


guitaral
15
Years of Service
User Offline
Joined: 30th Jun 2008
Location:
Posted: 1st Jul 2008 04:36
yeah, that's what i'm trying to figure out though...

could you post something that could maybe fix this? i was thinking maybe a smaller step between checks...
guitaral
15
Years of Service
User Offline
Joined: 30th Jun 2008
Location:
Posted: 2nd Jul 2008 04:30
okay, so the REAL problem for me are the corners. i think i'm going to use the line to line method (oldpos and newpos) to detect for a collision (actually less code than using the point to line method), but the corners will still be a pain. oy vey. suggestions?

Login to post a reply

Server time is: 2024-05-18 05:42:07
Your offset time is: 2024-05-18 05:42:07