Index  

trap_Trace

Description

Collision detection against all linked entities.

Prototype

    void trap_Trace(
        trace_t *results,
        const vec3_t start,
        const vec3_t mins,
        const vec3_t maxs,
        const vec3_t end,
        int passEntityNum,
        int contentmask
    );

Parameters

Remarks

This function is used to trace from one position to another in the BSP tree and store the results in a trace_t structure.
This is useful for temporarily deleting an entity or when performing major alterations to an entity's fields. Unlinking an entity that is already unlinked has no effect.
The results consist of the following information (where tr is a variable of type trace_t):
If the mins and maxs are NULL then the trace is treated as purely linear from point to point.
If mins and maxs are defined however a bounding box trace is performed whereby rather than a point the entire bounding box is traced so that it is possible to detect the collision between solid entities. For example, tracing directly downwards onto a floor with mins and maxs set to { -15, -15, -15 } and { 15, 15, 15 } respectively starting at some point above the floor will result in a trace_t with an endpoint 15 units from the floor.

Return value

This function has no return value.

See also

Author(s)

Die


QuakeIII trap calls reference