nanos world API Reference Unofficial documentation
Static function Client Moderate

Trace.CapsuleSingle

Trace a capsule against the world and returns a table with the first blocking hit information<br/><br/>Note: The Trace will collide with the ObjectType (in the Collision Settings), even if the channel is ignored below.

Syntax

Lua
Trace.CapsuleSingle(start_location, end_location, radius, half_height, collision_channel = WorldStatic, trace_mode = 0, ignored_actors = {})

Parameters

Name Type Default Description
start_location Vector Start location of the capsule
end_location Vector End location of the capsule
radius float Radius of the capsule to sweep
half_height float Distance from center of capsule to tip of hemisphere endcap.
collision_channel optional CollisionChannel|integer WorldStatic Supports several channels separating by <code>|</code> (using bit-wise operations)
trace_mode optional TraceMode|integer 0 Trace Mode, pass all parameters separating by <code>|</code> (using bit-wise operations)<br/><br/>You need to explicitly pass the modes to return the values you want
ignored_actors optional Actor[] {} Array of actors to ignore during the trace

Returns