Game Development Community

RC1: Obj overlapping trigger ignores tilemap collisions

by William Lee Sims · in Torque Game Builder · 06/01/2006 (8:05 pm) · 6 replies

I have a maze-like area created in a tilemap. As my player object (a static sprite) moves through it, it crosses t2dTrigger areas that I have pre-defined. While my player is overlapping a t2dTrigger area, it is, against all my wishes, ignoring the tilemap collisions. If I continue into the tilemap until I leave the t2dTrigger area, I then get permanently stuck in the tilemap.

My object has a collision polygon defined, if that matters. The tilemap portion that I'm going through is a simple square with a square (or full) collision defined.

#1
06/01/2006 (9:50 pm)
It looks like the function t2dSceneObject::checkCollisionSend is seeing two collisions: the trigger and the tilemap. It sees the time to collision for the tilemap to be some small amount of time (like 0.003) while the triggers collision time is negative (I assume because we were already in it). It then only processes collision status on the trigger's area.

I could be mis-interpreting what I'm seeing... I tried to debug this before going to bed. I may have to de-activate collision on my triggers after they've been activated. This will work for my current game, but probably won't be a good, general solution.
#2
06/02/2006 (7:21 am)
I also acknowledge this bug !!!

But the negative time is not related to the trigger. I also have the same type of game : a maze with triggers & objects. If I remove the trigger, I still get the negative time.

This seems to be due to a "late" collision call. The collision is issued when the player is ALREADY overlapping the wall. This also calls a phenomenon that I call "Tunneling". This makes the player traverse the wall to the other side.

At first I thought that was related to the collision box orientation ( clockwise or counter-clockwise ). But it isn't.

The problem seems to be aggravated by the triggers because the collision algorithm is genarating collisions while the player is in the trigger, thus increasing the overhead of collision processing.

Suppressing the collision algorithm when the player enters or stays in the trigger causes an immeadiate OnLeave call.

In Beta2 tunneling could be prevented by a setAtRest call inside a collision callback handler. This method fails in both RC1 and Beta4
#3
12/10/2012 (11:06 pm)
It seems this bug still exists :) Is there some workaround?
#4
12/11/2012 (6:18 am)
I acknowledge it too. :-\ It bounces me in and out of it for a weird reason.
#5
12/12/2012 (10:09 am)
Boy, I would have assumed that this bug was fixed by now. I looked at my old game and it looks like I no longer have any special code to handle triggers which makes me think that GG got them working eventually.

I have one idea for a workaround, but it depends upon how you use triggers. Are they a one time thing? Could they be deleted after you enter them?

Unfortunately, I've never seen a trigger bounce my character around.
#6
12/12/2012 (10:22 am)
I looked through some of the older TGB posts and it appears that a fix did go in in RC3 (during the alpha version). I also saw posts from as late as 1.7.5 that showed people having the same problem. Maybe the bug got reintroduced as part of another fix. I know that this isn't helpful, but maybe it will trigger somebody's memory of the problem.