T2D & swept circle collision detection
by Paul Pridham · in Torque Game Engine · 03/14/2005 (7:28 am) · 3 replies
Are there any plans to add swept-circle collisions to Torque 2D? I realize that T2D uses swept polygons currently (which is great!) but in certain cases it would be more efficient to use circles, such as in a pinball game, or an asteroids/space game with many objects.
#2
Anyway, what you describe regarding the collisions makes sense, of course. I'm really looking forward to picking up T2D and playing around with it later this spring! Sounds like it will really help me get the ball rolling. Thanks!
03/14/2005 (6:21 pm)
Ahh! No wonder I didn't see the Torque 2D forum, it was waaaaaay at the bottom there. ;) I'll post there next time.Anyway, what you describe regarding the collisions makes sense, of course. I'm really looking forward to picking up T2D and playing around with it later this spring! Sounds like it will really help me get the ball rolling. Thanks!
Associate Melv May
To answer your question though, yes, we intend to add different collision primitives to T2D but we've got so many other things we need to work on as well that we won't be doing it immediately, To be honest though, being as we supply all the C++ source-code, it's really easy to add other custom collision solution and plug them into the existing architecture. We've designed it so that you can do it and although we've not got any T2D specific C++ documentation out there yet, apart from the well commented code, it's not a difficult task.
You can still do all these games without having to use swept-circle although of course, that is more efficient in the end but not always necessary. T2Ds swept polygon system is very fast and it's unlikely that a pinball game is going to bring it to its knees. Also, asteroids games work much better with convex polygons than they do with circles as you can have odd shaped asteroids. Also, don't forget that T2D has a two-phase collision system, a broad-phase, very fast quick determination followed only then by the swept polygon one.
At this point in the EA release, it's about fixing any problems we've found and making sure that we've got a nice and stable solution (which we think we have) before moving onto the bigger task of adding all the other stuff we mentioned in the plans.
Lots of good stuff to come. :)
- Melv.