RaweTrip
  • Welcome
  • Official Discord
  • Useful information
    • πŸ”ŒFor beginners
    • β™ŸοΈCommon knowledge
    • πŸ“šExamples
      • βš™οΈTab system
      • βš™οΈUI Interaction
      • βš™οΈClantag
      • βš™οΈWireframe smoke
  • documentation
    • ⛓️Common
      • πŸ“žCallbacks list
    • βš™οΈVariables
      • πŸ‘€esp
      • πŸ“œplist
      • πŸ”«weapon
      • ⚑vector
      • 🎨color
      • πŸŽ“cheat
      • πŸ’»ui
      • πŸ™οΈrender
      • πŸšΆβ€β™‚οΈentity
      • 🌎globalvars
      • πŸ› οΈengine
      • πŸ”©utils
      • πŸ–₯️console
      • πŸ”‘base64
      • πŸ“ bit
      • πŸ—ƒοΈfile
      • πŸ“Άhttp
      • βœ‰οΈchat
      • 〽️animate
      • 🧱materials
      • πŸ”§steam
      • ✈️trace
      • πŸ”—interfaces
        • πŸ’‘ieffects
        • 🧬precache
        • πŸ’³model_info
    • πŸ”’Enumerations
      • 🎞️enum_frames
Powered by GitBook
On this page
  • Functions:
  • ray
  1. documentation
  2. Variables

trace

PrevioussteamNextinterfaces

Last updated 2 years ago

Functions:

ray

trace.ray(vec_start: vector, vec_end: vector, skip_entity: entity, mask: number): trace

Name
Type
Description

vec_start

vector

Vector to start tracing from

vec_end

vector

Vector to trace to

skip_entity

entity

Entity skipping options

mask

number

Trace mask

local trace_example = trace.ray(vector(0,0,0), vector(100, 100, 100), entity.get_local(), 0xFFFFFFFF)
local trace_fraction = trace_example.fraction

Returns a struct containing all the information.

πŸ”— struct trace

Name
Type
Description

fraction

number

Percentage in the range [0.0, 1.0]. How far the trace went before hitting something. 1.0 - didn't hit anything

hit_entity

entity

Entity that was hit by the trace

hitgroup

number

0 - generic, non-zero is specific body part

endpos

vector

Final position

βš™οΈ
✈️
trace