trace_line
- Синтаксис
-
native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]);
Переменная | Описание |
---|---|
iIgnoreEnt |
Entity index that trace will ignore, -1 if trace should not ignore any entities |
fStart |
Trace starting point |
fEnd |
Trace target point |
vReturn |
Vector to copy trace end point to |
- Описание
- Fires a trace line between two origins, retrieving the end point and entity hit.
- Пометка
-
This native writes to the global engine module trace handle. Additional trace results can be retrieved using traceresult().
- Пометка
-
This native returns 0 if the trace did not hit anything. As 0 is an entity index that is considered to be a valid value for a trace hit ("worldspawn"), this native can potentially return a misleading value. Check other components of the trace result to verify the entity index.
- Возвращает
- Entity index if trace hit an entity, 0 otherwise