Game Development Community

1.7.4 - Collision, Movement and Trigger

by Thomas Bang · in Torque Game Builder · 09/23/2008 (7:44 pm) · 4 replies

Hi

Problem with the current version 1.7.4.

I have a simple movement code. With version 1.7.3 everything works fine. But if i try the same project with 1.7.4 the player is oscillating. Also the trigger events are not detected.

To see the difference: 2 executables (1.7.3 & 1.7.4)

@Melv:

If you want... here are...

the project files


Greetings

Thomas

#1
09/26/2008 (5:43 pm)
I still have this same issue; any discoveries would be awesome.
#2
10/05/2008 (10:18 am)
One basic rule I learned: AVOID TRIGGERS.
They're extremely inefficient in many aspects (they add a considerable amount of useless collision checks, even when you're trying to limit its collision groups and such, still true for 1.7.4, and now these bugs...). I'm now coding without any triggers (using some workarounds instead) and everything is running a LOT more better and smoother.

It seems Melv was trying to fix them, but it doesn't seems to be an easy task.
#3
12/08/2009 (2:54 pm)
What sort of workarounds have people come up with to avoid using triggers? Right now (over a year after the last post in this thread), triggers seem to be completely broken.
#4
12/09/2009 (8:28 pm)
Consider using pickrect. With it you have at least three ways to do the work that a trigger would: First, you could just ask it to arbitrarily search in an area (say returning all IDs within an area ranging from -100, -100 to 100,100); second, you can emulate triggers by setting up a sceneObject and using its size as parameters for the area to search; or third you could embed logic for detection in the objects that need to be discovered themselves.

The last might sound a bit backwards, but in the space game I'm working on I do this whenever I want to know whether the player's ship is over a planet. Previously I had triggers for all the planets but they didn't scale as the levels became more complex. So now I use the ship's bounding box coordinates to call pickrect whenever the player hits a certain key. This obviously is a lot more efficient than having triggers eat up processor time in searches that will most often fail.