Table of Contents

Struct TraceResult

Namespace
CounterStrikeSharp.API.Modules.Utils
Assembly
CounterStrikeSharp.API.dll

Result of a ray or hull trace. Plain unmanaged value type — stack-allocated by the Trace methods and returned by value. No heap allocation, no disposal. Layout matches CSSTraceResult in natives_raytrace.cpp.

public struct TraceResult
Inherited Members

Properties

Contents

public Contents Contents { get; }

Property Value

Contents

EndPos

public Vector EndPos { get; }

Property Value

Vector

Fraction

public float Fraction { get; }

Property Value

float

HasExactHitPoint

public bool HasExactHitPoint { get; }

Property Value

bool

HitOffset

public float HitOffset { get; }

Property Value

float

HitPoint

public Vector HitPoint { get; }

Property Value

Vector

HitboxBoneIndex

public short HitboxBoneIndex { get; }

Property Value

short

IsAllSolid

public bool IsAllSolid { get; }

Property Value

bool

Normal

public Vector Normal { get; }

Property Value

Vector

RayType

public RayType_t RayType { get; }

Property Value

RayType_t

StartPos

public Vector StartPos { get; }

Property Value

Vector

TriangleIndex

public int TriangleIndex { get; }

Property Value

int

Methods

Body()

Native HPhysicsBody — opaque pointer.

public nint Body()

Returns

nint

DidHit()

public bool DidHit()

Returns

bool

HitEntity()

public CEntityInstance HitEntity()

Returns

CEntityInstance

Hitbox()

Native CHitBox* — opaque pointer.

public nint Hitbox()

Returns

nint

Shape()

Native HPhysicsShape — opaque pointer.

public nint Shape()

Returns

nint

Surface()

Native CPhysSurfaceProperties* — opaque pointer.

public nint Surface()

Returns

nint