shapetest

Methods

start_shape_test_los_probe

Asynchronously starts a line-of-sight (raycast) world probe shape test.

Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2.

p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used.

function native.shapetest.start_shape_test_los_probe(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, flags: int, entity: int, p8: int): int

_0x04aa59ca40571c2e

function native.shapetest._0x04aa59ca40571c2e(p0: int, p1: int): int

start_expensive_synchronous_shape_test_los_probe

Does the same as 0x7EE9F5D83DD4F90E, except blocking until the shape test completes.

function native.shapetest.start_expensive_synchronous_shape_test_los_probe(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, flags: int, entity_to_ignore: int, p8: int): int

start_shape_test_box

function native.shapetest.start_shape_test_box(pos_x: float, pos_y: float, pos_z: float, dimensions_x: float, dimensions_y: float, dimensions_z: float, rot_x: float, rot_y: float, rot_z: float, rotation_order: int, flags: int, entity_to_ignore: int, options: int): int

start_shape_test_capsule

function native.shapetest.start_shape_test_capsule(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, radius: float, flags: int, entity_to_ignore: int, p9: int): int

start_shape_test_swept_sphere

function native.shapetest.start_shape_test_swept_sphere(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float, radius: float, flags: int, entity: int, p9: int): int

start_shape_test_mouse_cursor_los_probe

Old name: _START_SHAPE_TEST_SURROUNDING_COORDS

function native.shapetest.start_shape_test_mouse_cursor_los_probe(p_vec1: ref vec3, p_vec2: ref vec3, flag: int, entity: int, flag2: int): int

get_shape_test_result

Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated.

When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated.

enum eShapeTestStatus { SHAPETEST_STATUS_NONEXISTENT, SHAPETEST_STATUS_RESULTS_NOTREADY, SHAPETEST_STATUS_RESULTS_READY };

function native.shapetest.get_shape_test_result(shape_test_handle: int, hit: ptr int, end_coords: ref vec3, surface_normal: ref vec3, entity_hit: ptr int): int