Game Development Community

dev|Pro Game Development Curriculum

Fix for ExtrudedPolyList

by Kyle Carter · 01/26/2007 (2:39 pm) · 25 comments

Download Code File

1. Replace collision/extrudedPolyList.cc/cpp with the files in the zip.
2. Recompile and enjoy.

This fix should work on both TGE and TGEA/TSE, tho minor modifications might be needed. The key changes are all graphics API independent.

Updates

4:30 PM 1/26/2007 - Uploaded new version that fixes collision problems with terrain.
Page «Previous 1 2
#1
01/26/2007 (3:19 pm)
Just an fyi, it's not a zip file, it's a single cc source file. Or at least that's what's linked right now from this resource. Sorta makes step one confusing hehe
#2
01/26/2007 (7:32 pm)
Does this by chance fix the issue of two players walking into eachother and getting "Stuck" in eachother?

www.garagegames.com/mg/forums/result.thread.php?qt=35886

Like the example in one of my older posts?
#3
01/26/2007 (10:14 pm)
This is an awesome resource and a great contribution to the community!

@Ben
I dropped you a line via email regarding this patch if you have a moment to review it. (email subject 'PATCH: Fix for ExtrudedPolyList')
#4
01/27/2007 (5:33 am)
Cool! Thanks!
#5
01/27/2007 (9:30 pm)
Awesome! This should be exceedingly useful. Thank you!
#6
01/29/2007 (4:21 pm)
@ Ramen - re player-vs-player collisions,
a while ago i added a special case for PVP collisions which first uses the existing bounding box collision
but then does a second pass using a custom bounding cylinder. it wasn't too tricky to make the PVP much better that way, imho.
#7
01/30/2007 (10:11 am)
Nice. Thanks.
#8
01/31/2007 (3:13 pm)
@ Orion ElenZil are you able to share any of that code?
#9
01/31/2007 (3:48 pm)
if i can scrape the time to consolidate it, sure.
actually i wrote it a looong time ago,
so it could probably use a fresh clean-up.
i'll try to do that next couple weeks.
#10
02/14/2007 (2:27 pm)
Fantastic. This has really cleaned up my vehicle vs. vehicle collisions quite a bit (I'm using the commented-out overloaded rigid vs. rigid collision solver in the Rigid class). There are still some occassional errors with collision handling, especially when one object pushes another at high speeds, but overall this is a huge improvement (and honestly about as good as I would expect a fully-networked physics system to work).

I haven't tried the updated version from 1/26, but I will as soon as I can -- I assume this will deal with the "object sinks into terrain" problem we've been seeing for.. well, forever.
#11
02/20/2007 (11:24 am)
Unfortunately I am not going to be able to give much in the way of detail here, because I am not sure of the details of what is going on at the code level, but this broke AIPlayer collision in my project. If I take two AIPlayer objects, and try to have one walk through the other, depending on their facing, they will not be stopped by a collision, and the walking one will walk right through the other. I traced it down to ExtrudedPolyList::end, and it looks like it never finds colliding faces. (It returns on the line that reads 'If (!cFace) return').
I've reverted to the old ExtrudedPolyList, and my project is working again, but I thought that I would mention it here.
#12
03/26/2007 (3:08 pm)
after adding this to our version of TGE, our player got stuck in a new place, so I just had to revert it back to the original.
#13
03/27/2007 (11:38 am)
Player vs. player collision does not work in Torque - not a fault of the extruded poly list, though it's possible that the change in behavior that this patch provides does change the level of brokenness in pvp collision.

Clint - what sort of stuckness are you seeing? This has been pretty heavily tested in Blockland and we've seen good behavior in some pretty pathological cases. The major stumbling block right now is if you have a bunch of collision boxes in a brick wall type arrangement - the player tends to stand on the tops of the boxes even though they're inaccessible. But situations like having the player stand inside a V and collide properly works great.

Do you have any workarounds for collision problems in there? Those can also interact badly now that extruded poly list works properly.
#14
03/27/2007 (1:49 pm)
hi Ben, stuck is probably too strong a word. We have one staircase, with a null brush ramp on it, the player isn't stepping up onto the null brush ramp, so they can't walk up the stairs without jumping over that edge. We have other places modeled exactly the same way with a null brush ramp onto some stairs that seem to work just fine. not sure what the difference is on this particular one.

We've definitely tweaked player collision code a good bit though, so like you say could just be something we've done.
#15
04/12/2007 (1:23 am)
Quote:
Player vs. player collision does not work in Torque

What does that mean? Players collide (not perfectly, but they do collide) when I tested it, are we talking about different things here? I am slightly confused. :/
#16
04/12/2007 (9:06 am)
I also was a bit confused by that comment. In my experience player vs player collision does work, and this fix made it work less well.
#17
04/12/2007 (9:58 am)
It only works if one player isn't moving.

If both players are working it "doesn't work" in the sense that it's not solving a swept box-box check, it's just checking one swept box against a fixed box, and another swept box against a fixed box. If you draw this out it's easy to see how collisions can be missed.

So from that perspective the fact that player collision works at all is kind of a fluke. :P
#18
04/12/2007 (10:25 am)
That makes sense to me, as that is the most common kind of player vs player collision in my project, so that would explain why I thought of it as working.
#19
05/10/2007 (6:47 pm)
I still get a problem with player to vehicle collisions at slow speeds. Any ideas?
#20
05/11/2007 (10:05 am)
It's the same problem as the player-player collisions. This resource will do nothing to address this issue; it just does spatial queries, not collision detection (which the polylist code does), nor collision resolution (which Rigid and friends do).
Page «Previous 1 2