Swept collisions

Discuss new features and future development.

Swept collisions

Postby 66speeder66 » Tue Aug 06, 2013 6:03 am

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?
Posts: 1
Joined: Tue Aug 06, 2013 5:46 am

Re: Swept collisions

Postby OandO » Tue Aug 06, 2013 7:15 am

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.
Posts: 8
Joined: Tue Jun 04, 2013 10:48 am

Re: Swept collisions

Postby slembcke » Tue Aug 06, 2013 8:23 am

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/
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest