Swept collisions

Discuss new features and future development.
Post Reply
66speeder66
Posts: 1
Joined: Tue Aug 06, 2013 5:46 am
Contact:

Swept collisions

Post by 66speeder66 »

I am working on my own project, a platformer game with Chipmunk physics library. I have added fast moving objects like boollets on scene which are bouncing. Because these objects are moving so fast, they often pass other objects on scene. I really like your library, but I came to the point when I need system which allows tunneling to detect collission.
So my quastion is, do you have in plan something like that in near feature?
OandO
Posts: 8
Joined: Tue Jun 04, 2013 10:48 am
Contact:

Re: Swept collisions

Post by OandO »

If it's just small things like bullets that are a problem, try doing a segment query ahead of the bullet for the frame. It won't perfectly detect anything that the full area of the bullet will collide with, but it will tell you (With reasonable accuracy from my point of view) what the bullet flew straight into.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Swept collisions

Post by slembcke »

So bullets are definitely problematic without swept collisions. On the other hand, I almost always implement them purely using segment queries anyway.

Swept collisions add a *lot* of complexity to the physics and that generally also means a pretty big performance hit. I also haven't been able to figure out a way around a lot of the thresholds everybody seems to do when doing swept collisions. I've yet to find a swept collision solution that I'm terribly happy with the tradeoffs.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests