Non-convex collision polygons
by Jason Cahill · in Torque Game Builder · 07/16/2005 (11:37 pm) · 4 replies
After reading another recent thread (see www.garagegames.com/mg/forums/result.thread.php?qt=32235) plus some thinking about what I would need for different kinds of 2D games, it became clear to me that supporting non-convex collision polygons would be really nice. To be frank, I wouldn't mind if the solution was: you must transform your polygon into a collection of convex polygons and we were allowed to have multiple polygons per object. After all, polygon triangulation and making convex decompositions are relatively easy to do and generally don't need to be done in real time.
What d'ya think Melv?
What d'ya think Melv?
About the author
#2
__
|/\|
I've been meaning to try this: make a new empty layer, and add the second triangle on the tile that corresponds to the tile below it... add the new layer to the collision masks. This should then let you collide with the polys on both layers.
I think this solution, if it works, would only work for send collisions, not receives. For tile layers that dont have to react to collisions, I think it should work though. Specifically, an example would be a cavern that doesn't move, and a player that bounces off the cavern walls.
As a vote for future functionality though, if it's easier to say that convex isn't supported, but multiple polys per object *is* supported, I'd be more than fine with that.
10/26/2005 (1:23 pm)
Ive been thinking about this a little bit also. In my case, I wanted to have some concave polys on a tile... nothing complicated, like a square with a triangle cut out of it __
|/\|
I've been meaning to try this: make a new empty layer, and add the second triangle on the tile that corresponds to the tile below it... add the new layer to the collision masks. This should then let you collide with the polys on both layers.
I think this solution, if it works, would only work for send collisions, not receives. For tile layers that dont have to react to collisions, I think it should work though. Specifically, an example would be a cavern that doesn't move, and a player that bounces off the cavern walls.
As a vote for future functionality though, if it's easier to say that convex isn't supported, but multiple polys per object *is* supported, I'd be more than fine with that.
#3
I know I'm Digging up an Old topic here, but... thats what google search will do for you. :D
It looks like its been almost a year since this was last touched, so I don't feel so bad about bringing it up.
From what Melv was saying, it looks like it was considered in the past, I was just curious if there were any plan for this in the future...
I know that there's tons of these types of questions asked, and that proabably indicates something, but not a topic for discussion in this group.
But I think its obvious why non-convex collision polygon support would be very useful, and am very curious if it slated for integration into the indie-non source version of TGB (or any version for that matter).
This kind of information can be very useful when long term planning for future game development, I mean if I know it's NO going to be integrated I can just start looking for alternatives.
If it IS going to be integrated, I can avoid using the non-convex collision polys in the interim, with an eye to the fact that at some point I know it will be there.
Basically it gets down to being able to plan for the future, and this again is a discussion for the general forum.
Thanks for any feedback.
09/20/2006 (9:47 pm)
For anyone who wants to reply...I know I'm Digging up an Old topic here, but... thats what google search will do for you. :D
It looks like its been almost a year since this was last touched, so I don't feel so bad about bringing it up.
From what Melv was saying, it looks like it was considered in the past, I was just curious if there were any plan for this in the future...
I know that there's tons of these types of questions asked, and that proabably indicates something, but not a topic for discussion in this group.
But I think its obvious why non-convex collision polygon support would be very useful, and am very curious if it slated for integration into the indie-non source version of TGB (or any version for that matter).
This kind of information can be very useful when long term planning for future game development, I mean if I know it's NO going to be integrated I can just start looking for alternatives.
If it IS going to be integrated, I can avoid using the non-convex collision polys in the interim, with an eye to the fact that at some point I know it will be there.
Basically it gets down to being able to plan for the future, and this again is a discussion for the general forum.
Thanks for any feedback.
#4
Of course, there are quite a few white papers on the internet for pixel perfect and non-convex 2D collision in a swept model, and it's critically important for you (and you have a Pro license), you can certainly implement them yourself.
09/21/2006 (12:38 am)
I'm not aware of any immediate plans to implement non-convex or multiple collision polys per object myself, but I can think of at least one way to mimic the concept (mount multiple sceneObjects that don't render to linkpoints on your base object, and handle collision callbacks on them).Of course, there are quite a few white papers on the internet for pixel perfect and non-convex 2D collision in a swept model, and it's critically important for you (and you have a Pro license), you can certainly implement them yourself.
Associate Melv May
It's all time, time, time I guess!
- Melv.