GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL
Returns the result of a shape test, also returning the material of any touched surface. When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. Unless the return value is 2, the other return values are undefined.
CFX
Signature
lua
GetShapeTestResultIncludingMaterial(0, hit, endCoords, surfaceNormal, GetHashKey("..."), entityHit)
-- returns intParameters
| Name | Type | Description |
|---|---|---|
| int | A shape test handle. | |
| BOOL* | Whether or not the shape test hit any collisions. | |
| Vector3* | The resulting coordinates where the shape test hit a collision. | |
| Vector3* | The surface normal of the hit position. | |
| Hash* | hash of the hit material or surface type, see materialFX.dat | |
| Entity* | Any dynamic entity hit by the shape test. |
Usage
lua
GetShapeTestResultIncludingMaterial(0, hit, endCoords, surfaceNormal, GetHashKey("..."), entityHit)Generated from the native name, hash, and parameter list. Add a real example.
Details
- Hash
- API set
- Source
- cfx
Source: cfx
