Game Development Community

InteriorInstance::createTriggerTransform(...)

by Badguy · in Torque Game Engine · 04/05/2003 (11:45 pm) · 6 replies

This function Used in one place:
InteriorInstance::addChildren()

seems to work but is there something else in this function Not done to the trigger to make it stable?

what happens is when using this code to create a trigger..
the trigger works then right after this function but
when the mission is saved and reloaded this trigger no longer works
debugging brings the player in to calling the trigger functions but fails at

Trigger::testObject(..)
return mClippedList.isEmpty() == false;

meaning it came up empty handed when you Know your in the trigger
simply moving the trigger or anything else doesnt help.

if anyone has any advice on this I would like to hear it :)

#1
01/08/2004 (3:57 pm)
We got to exactly this same point BadGuy--we are having the problem since adding Mark Harmon's pathedInteriors...so I guess we following your same trail.

Follow-up thoughts: It just occurred to me that perhaps the trigger polyhedrons are not being converted correctly from the sub-object coordinate system to the world coordinate system??
#2
01/08/2004 (4:58 pm)
I would be willing to go with marks response.
let me get the link.
Quote:Hmm... the triggers only work properly if the plane normals are facing in the right direction (can't remember if it's in or out). The reason they were failing before is that the polyhedron would get exported in such a way that when it was read back in the plane normals would be pointing in the wrong direction. Not sure if this is the reason why your's aren't working...

www.garagegames.com/mg/forums/result.thread.php?qt=4655
#3
01/08/2004 (5:05 pm)
I debugged this a bit, more than a year ago.
the trigger is in the right space.

and when the player walks into it it fires the code.

the problem is when adding to the collision list.
something is wrong with the collision on this polyhedron.

now considering the normals sure.. that could be it.

note that when in game with this trigger added, you dont see the normal's like in the other triggers.

this is prolly not that hard to fix.
#4
01/08/2004 (5:20 pm)
Badguy--check my post in sdk bugs--see what you think
#5
01/08/2004 (5:23 pm)
GW soldier!!
im all for it..
looks better now anyhow..


I dont know how it will effect physical zones tho.

are those Only for force fields?
are you sure?

I dont think it should effect them at all.
#6
01/09/2004 (7:01 am)
These are the other uses of physical zone:

addField("velocityMod",  TypeF32,               Offset(mVelocityMod,  PhysicalZone));
   addField("gravityMod",   TypeF32,               Offset(mGravityMod,   PhysicalZone));
   addField("appliedForce", TypePoint3F,           Offset(mAppliedForce, PhysicalZone));
   addField("polyhedron",   TypeTriggerPolyhedron, Offset(mPolyhedron,   PhysicalZone));