Game Development Community

RC1: Weird collision bug

by Jemand den es nicht gibt · in Torque Game Builder · 06/01/2006 (11:36 am) · 8 replies

Hiya!

I am making this small game and in the game you can push around some crates. The crates have full(standard) collision bounding box on. My main character has its collision polygon setup as shown in this picture:

http://hazel.eternal-plague.de/Zwischenablage01.png

Now, in the game, when I run up against a crate the character starts pusing it as expected, but sometimes it gets catapulted through the crate and vice versa:

http://hazel.eternal-plague.de/Zwischenablage02.png
http://hazel.eternal-plague.de/Zwischenablage04.png

I think it might be the way I set up my collision polygon. All points are in only 2 of 4 quadrants(normally you would expect at least one point in each quadrant). In this case the points are in the quadrants -/- and +/-. I tried out what would happen if I moved the points into the +/+ and -/+ quadrants... same behaviour but only if I push the crates DOWN. I also tried to edit the level editor to have the poly CCW or CW for both, player and crates in ALL cases, but that didn't show any effect at all. I'm pretty lost here... I don't think it's a malcalculation of normals as that bug seems to happen randomly... sometimes I can push around the crates for a few seconds until it happens.

Any help would be appreciated... I tried to solve that bug since Beta3 and I'm starting to go crazy. ;)

#1
06/02/2006 (7:25 am)
You are experiencing the "Tunneling" effect. I already posted some messages on this subject. There was a trick on Beta2 : using a setAtRest method inside an OnCollision callback. But it doesn't work anymore in Beta4 and RC1
#2
06/02/2006 (9:24 am)
Plus setAtRest would be pretty dumb considering I want to MOVE the crates. :)
#3
06/07/2006 (7:31 am)
Is this bug being worked on or am I left alone with it? Just want to make sure since no one else has commented on it yet...
#4
06/15/2006 (2:03 am)
*bump*

Still in RC3... it looks like nothing has changed regarding this. :/ I tried fixing it myself but I'm totally lost there. Is this bug going to be fixed any time soon? I can upload a small project..
#5
06/20/2006 (2:01 pm)
And another *bump* ;)

Well, sadly this bug is still remaining in 1.1 and it's not even listed as a known issue. :/

I uploaded it here: http://www1.file-upload.net/download_20.06.06/2ktap.zip.html

Just try the level collisiontest2... I made it with 1.1 final.

[edit]

the two big boulders work just fine but you cannot push the small boulder upwards.. either you get stuck, or if you struggle you get tunneled through it and vice versa.
#6
06/20/2006 (5:36 pm)
Lol, we already talked some in the "cardinal direction movement" thread, and now here we are again having the same problem. I don't know if anyone is working on it but obviously neither of our games can be considered finished with this bug.
#7
06/21/2006 (6:20 am)
Oliver,

Check if the collision polygon encompasses the center of your object.
#8
06/21/2006 (10:33 am)
I'm posting on this thread and mine,
Tunneling is still happening for me with the center in the polygon and using maxiterations 3.