Vec3Like.
Without a map loaded every query returns
null, the boolean ones too. Check for null before .hit.Overview
Filters
Presets,
filter, ignore, clearIgnore.Rays and sweeps
ray, rayAll, box, sphere, capsule.Point queries
isVisible, isSolid, overlapSphere, closestPoint.Results
TraceResult, OverlapResult, ClosestPointResult.Filters
Every query takes a filter last: a preset name, atrace.filter() object, or inline options. Omitted means "bullet".
filter
Tags:
pass_bullets, player_clip, npc_clip, grenade_clip, ladder, window, sky, player, thrown_grenade, solid, block_los, block_light, block_sound.
ignore
Rays and sweeps
ray
null without a map.
rayAll
maxHits (default 32, max 128). null without a map.
Sweeps
start to end and stops at the first hit. Box mins/maxs are relative to the moving position.
Point queries
isVisible
null without a map.
isSolid
point is inside solid geometry, using the "everything" preset. null without a map.
overlapSphere
null without a map.
closestPoint
maxDistance, or null when there’s none (or no map).
Results
OverlapResult has position, normal, depth (penetration), entity and entityIndex. ClosestPointResult has position, normal, distance, entity and entityIndex.