KiLL3R

BulletTrace( <start>, <end>, <hit characters>, <ignore entity> )


Module: Trace

Summary:

Allows script to do a point trace with MASK_SHOT. Returns hit position, hit entity, hit surface normal and surface type.



Example:

playfxunderme()
{
	trace = bulletTrace(self.origin + (0,0,10), self.origin + (0,0,-1000), false, undefined);
	playfx(level.fx_bomb,trace["position"],trace["normal"]);
}



Required Args:

  • 1 : <start> The bullet start point
  • 2 : <end> The bullet end point
  • 3 : <hit characters> When set to true, traces will hit players
  • 4 : <ignore entity> An entity to ignore