Game Development Community

mSourceObject ?

by Enel · in Torque 3D Professional · 07/07/2010 (3:55 am) · 2 replies

i set code like this and i wanna follow Projectile to MountObject MuzzlePoint Pos

if(mDataBlock->AttachMuzzlePoint){
	   
	   Point3F Pos;

	   if ( mSourceObject.isValid() ) {
		   setMaskBits(MuzzleAttachMask);

		   mSourceObject->getMuzzlePoint(0, &pos);

		   newPosition = pos;
	   }
   }
   else
	   newPosition = oldPosition + mCurrVelocity * (F32(TickMs) / 1000.0f);

but mSourceObject bitvalue suddenly change to 0x0000000... BTW Projectile dosent have position..

what is Problem?.. im use T3D 1.1 Alpha :)

thx.

#1
07/07/2010 (10:46 am)
A few ticks (7 I think) after a projectile is added mSourceObject is set to 0, see Projectile::processTick() in projectile.cpp

There are several similar explanations for this behavior.
#2
07/07/2010 (10:19 pm)
@ Michael

i find it :) thx michael~