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
EndPos
public Vector EndPos { get; }
Property Value
Fraction
public float Fraction { get; }
Property Value
HasExactHitPoint
public bool HasExactHitPoint { get; }
Property Value
HitOffset
public float HitOffset { get; }
Property Value
HitPoint
public Vector HitPoint { get; }
Property Value
HitboxBoneIndex
public short HitboxBoneIndex { get; }
Property Value
IsAllSolid
public bool IsAllSolid { get; }
Property Value
Normal
public Vector Normal { get; }
Property Value
RayType
public RayType_t RayType { get; }
Property Value
StartPos
public Vector StartPos { get; }
Property Value
TriangleIndex
public int TriangleIndex { get; }
Property Value
Methods
Body()
Native HPhysicsBody — opaque pointer.
public nint Body()
Returns
DidHit()
public bool DidHit()
Returns
HitEntity()
public CEntityInstance HitEntity()
Returns
Hitbox()
Native CHitBox* — opaque pointer.
public nint Hitbox()
Returns
Shape()
Native HPhysicsShape — opaque pointer.
public nint Shape()
Returns
Surface()
Native CPhysSurfaceProperties* — opaque pointer.
public nint Surface()