Garry's Mod Wiki

EFFECT:GetTracerShootPos

  Vector EFFECT:GetTracerShootPos( Vector pos, Weapon ent, number attachment )

Description

Used to get the "real" start position of a trace, for weapon tracer effects.

"real" meaning in 3rd person, the 3rd person position will be used, in first person the first person position will be used.

Arguments

1 Vector pos
Default position if we fail
2 Weapon ent
The weapon to use.
3 number attachment
Attachment ID of on the weapon "muzzle", to use as the start position.
Please note that it is expected that the same attachment ID is used on both, the world and the view model.

Returns

1 Vector
The "real" start position.