GET_SHAPE_TEST_RESULT
Reads the result of an asynchronous shape test into hit, endCoords, surfaceNormal and entityHit, and returns its status (0 invalid, 1 pending, 2 ready).
Poll it each frame after starting a test until it stops returning 1.
Signature
int GET_SHAPE_TEST_RESULT(ScrHandle shapeTestHandle, BOOL* hit, Vector3* endCoords, Vector3* surfaceNormal, Entity* entityHit); // 0xEDE8AC7C5108FB1D b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | shapeTestHandle | ScrHandle |
| 2 | hit | BOOL* (out pointer) |
| 3 | endCoords | Vector3* (out pointer) |
| 4 | surfaceNormal | Vector3* (out pointer) |
| 5 | entityHit | Entity* (out pointer) |
Facts
| Name | GET_SHAPE_TEST_RESULT |
|---|---|
| Hash | 0xEDE8AC7C5108FB1D |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, hit, endCoords, surfaceNormal, entityHit = Citizen.InvokeNative(0xEDE8AC7C5108FB1D, -- GET_SHAPE_TEST_RESULT
0, -- ScrHandle shapeTestHandle
Citizen.PointerValueInt(), -- BOOL* hit
Citizen.PointerValueVector(), -- Vector3* endCoords
Citizen.PointerValueVector(), -- Vector3* surfaceNormal
Citizen.PointerValueInt(), -- Entity* entityHit
Citizen.ResultAsInteger()
)
print(result, hit, endCoords, surfaceNormal, entityHit)const [result, hit, endCoords, surfaceNormal, entityHit] = Citizen.invokeNative("0xEDE8AC7C5108FB1D", // GET_SHAPE_TEST_RESULT
0, // ScrHandle shapeTestHandle
Citizen.pointerValueInt(), // BOOL* hit
Citizen.pointerValueVector(), // Vector3* endCoords
Citizen.pointerValueVector(), // Vector3* surfaceNormal
Citizen.pointerValueInt(), // Entity* entityHit
Citizen.resultAsInteger()
);
console.log(result, hit, endCoords, surfaceNormal, entityHit)var hitArg = new OutputArgument();
var endCoordsArg = new OutputArgument();
var surfaceNormalArg = new OutputArgument();
var entityHitArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xEDE8AC7C5108FB1D, // GET_SHAPE_TEST_RESULT
0, // ScrHandle shapeTestHandle
hitArg, // BOOL* hit
endCoordsArg, // Vector3* endCoords
surfaceNormalArg, // Vector3* surfaceNormal
entityHitArg // Entity* entityHit
);
bool hit = hitArg.GetResult<bool>();
Vector3 endCoords = endCoordsArg.GetResult<Vector3>();
Vector3 surfaceNormal = surfaceNormalArg.GetResult<Vector3>();
int entityHit = entityHitArg.GetResult<int>();Related SHAPETEST natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.