Game Development Community

TGEA 1.7.0 Beta 1 Bug - Weapons and triggers

by Kirk Longendyke · in Torque Game Engine Advanced · 03/21/2008 (12:28 pm) · 3 replies

Due to the castray addition of triggers, mounted weapon vectors are throw off:
img183.imageshack.us/img183/2971/triggercollisionjo4.th.jpg


Generally acceptable quick-resolution is to simply rem that bit of functionality out. Will see about hunting down the proper resolution ie: masking out the specific case as time allows.

#1
03/26/2008 (11:59 pm)
I can't seem to reproduce this. Have you tried this with the defaultTrigger and Rocket Launcher in the T3D example? Or with the Crossbow in Stronghold?
#2
03/27/2008 (12:35 am)
Right so. just to doccument this one:

Proper fix:

two possible fixes, both based on :

bool ShapeBase::getCorrectedAim(const MatrixF& muzzleMat, VectorF* result)
{
...
      if (getContainer()->castRay(eyePos, aheadPoint, 0xFFFFFFFF, &rinfo))
...
}

if you preffer addative change it to

bool ShapeBase::getCorrectedAim(const MatrixF& muzzleMat, VectorF* result)
{
...
      if (getContainer()->castRay(eyePos, aheadPoint, STATIC_COLLISION_MASK|DAMAGEABLE_MASK, &rinfo))
...
}

if you preffer filtered, use
bool ShapeBase::getCorrectedAim(const MatrixF& muzzleMat, VectorF* result)
{
...
      if (getContainer()->castRay(eyePos, aheadPoint, 0xFFFFFFFF & ~(TriggerObjectType|DefaultObjectType|GameBaseObjectType), &rinfo))
...
}
#3
03/31/2008 (10:44 am)
This should be fixed in Beta 2. Please retest if you get a chance. Thanks!