GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
Loading...
Searching...
No Matches
Physics rays

Every cast the engine makes passes through the hook. More...

Data Structures

struct  ShRay
 dir is a full length vector, so origin + dir is the end of the trace rather than a unit direction. More...
struct  ShRayQuery
 A query over the recorded rays. More...

Enumerations

enum  ShRayMode { SH_RAY_OFF = 0 , SH_RAY_ALL , SH_RAY_DIRECTED }

Functions

SH_API void ShRayFilter (const ShVec3 *from, float radius, float minLength)
 The engine casts about 100k rays a second, so an unfiltered ring holds only a few milliseconds.
SH_API void ShRayFilterPlayer (float radius, float minLength)
 Track the player instead.
SH_API void ShRayLog (int mode)
 Recording is off by default: it costs a copy on every cast, and the engine casts a great many per frame.
SH_API uint32_t ShRayCount (void)
SH_API int ShGetRays (ShRay *out, int max)
 Fills out with the most recent rays, newest first.
SH_API int ShQueryRays (const ShRayQuery *q, ShRay *out, int max)
 Newest first, only the rays matching the query.

Detailed Description

Every cast the engine makes passes through the hook.

Enumeration Type Documentation

◆ ShRayMode

enum ShRayMode
Enumerator
SH_RAY_OFF 
SH_RAY_ALL 

everything, tens of thousands a second

SH_RAY_DIRECTED 

skip the straight down ground probes

Function Documentation

◆ ShRayFilter()

SH_API void ShRayFilter ( const ShVec3 * from,
float radius,
float minLength )

The engine casts about 100k rays a second, so an unfiltered ring holds only a few milliseconds.

Record only traces starting within radius of a point and at least minLength long. Radius 0 records all.

◆ ShRayFilterPlayer()

SH_API void ShRayFilterPlayer ( float radius,
float minLength )

Track the player instead.

Radius 0 turns it off.

◆ ShRayLog()

SH_API void ShRayLog ( int mode)

Recording is off by default: it costs a copy on every cast, and the engine casts a great many per frame.

◆ ShRayCount()

SH_API uint32_t ShRayCount ( void )

◆ ShGetRays()

SH_API int ShGetRays ( ShRay * out,
int max )

Fills out with the most recent rays, newest first.

◆ ShQueryRays()

SH_API int ShQueryRays ( const ShRayQuery * q,
ShRay * out,
int max )

Newest first, only the rays matching the query.