Skip to content
ASArcaneMP Scripting APIScripting reference
Data shapeClient APIGenerated

TraceHit

Defined in: client/api.d.ts:6400

The first blocking hit of a World.lineTrace.

readonly actor: { class: string; name: string; } | null

Defined in: client/api.d.ts:6449

The actor hit. Names are this client’s own and differ between clients; don’t send them to compare.


readonly bone: string | null

Defined in: client/api.d.ts:6459

The bone hit on a skeletal body.


readonly component: { class: string; name: string; } | null

Defined in: client/api.d.ts:6454

The component hit.


readonly distance: number

Defined in: client/api.d.ts:6424

Distance from start to the hit, in centimetres.


readonly entity: { id: number; type: "beast" | "player" | "npc" | "worldObject" | "character"; } | null

Defined in: client/api.d.ts:6469

The replicated entity whose body was hit, with its network id; null for the level and anything else not replicated.


readonly impactNormal: Vec3

Defined in: client/api.d.ts:6419

Surface normal at the impact point: up for flat ground, the wall’s facing for a wall.


readonly impactPoint: Vec3

Defined in: client/api.d.ts:6409

The point on the surface that was hit.


readonly levelObject: string | null

Defined in: client/api.d.ts:6464

The LevelObjects key of the placed level object hit (one instance’s key on an instanced mesh), the same on every client; null for an entity, anything spawned at runtime, and characters.


readonly location: Vec3

Defined in: client/api.d.ts:6404

Where the trace stopped. For a line trace this is the impact point.


readonly normal: Vec3

Defined in: client/api.d.ts:6414

Normal of the trace shape at the hit; for a line trace, the same as impactNormal.


readonly objectType: string | null

Defined in: client/api.d.ts:6439

The hit body’s object type (“worldStatic”, “pawn”, “shallowWater”, …), null when the hit has no component.


readonly startPenetrating: boolean

Defined in: client/api.d.ts:6434

Whether start was already inside the body hit; the normals are then unreliable.


readonly surface: string | null

Defined in: client/api.d.ts:6444

The physical surface hit, as the game names it (“Grass”, “Stone”, “Water”, “Default”, …); null without a physical material.


readonly time: number

Defined in: client/api.d.ts:6429

Fraction of the way from start to end, 0..1.