Skip to main content

Raycast

Client Server

A raycast builder — you don't construct it directly, you get one from Cast:Ray(origin, direction). Chain filters (Ignore/Force) and options (WithColor/WithNormal/…), then call :Run() for the first hit or :RunAll() for all hits:

local hit = Cast:Ray(pos, dir):Ignore(self.obj):Run()

Methods

Raycast WithColor()

Raycast WithNormal()

Raycast WithMaterial()

Raycast Draw()

Hit[] RunAll()

Hit Run()

Properties

fun(op: Raycast, ignore: Object|Object[]?): Raycast Ignore

fun(op: Raycast, force: Object|Object[]?): Raycast Force

fun(op: Raycast): Raycast ForceStatic

fun(op: Raycast): Raycast IgnoreStatic

fun(op: Raycast, tag: string|string[]): Raycast ForceTag

fun(op: Raycast, tag: string|string[]): Raycast IgnoreTag