SwiftlyS2

TraceParams

Struct TraceParams

Namespace: SwiftlyS2.Shared.Trace

Assembly: SwiftlyS2.CS2.dll

Unified parameters for shape tracing APIs. This combines trace shape and filter settings in one object.

public struct TraceParams

Inherited Members

Constructors

TraceParams()

public TraceParams()

Properties

Collision

Collision group used by the trace.

public CollisionGroup Collision { get; set; }
Property Value

EntitiesToIgnore

Entities that should be ignored by the trace.

public List<CEntityInstance> EntitiesToIgnore { get; set; }
Property Value

ForceHitEverything

Force the trace to hit everything.

public bool ForceHitEverything { get; set; }
Property Value

HierarchyIds

Optional hierarchy ids used by the native query shape attributes (max 2 values used).

public List<ushort> HierarchyIds { get; set; }
Property Value

HitSolid

Whether the trace should report solid hits.

public bool HitSolid { get; set; }
Property Value

HitSolidRequiresGenerateContacts

Whether the trace should report hits requiring contact generation.

public bool HitSolidRequiresGenerateContacts { get; set; }
Property Value

HitTrigger

Whether the trace should report trigger hits.

public bool HitTrigger { get; set; }
Property Value

IgnoreIfBothInteractWithHitboxes

Whether hitboxes should be ignored when both sides interact with hitboxes.

public bool IgnoreIfBothInteractWithHitboxes { get; set; }
Property Value

IncludedDetailLayers

Included detail layers used by native query shape attributes.

public ushort IncludedDetailLayers { get; set; }
Property Value

InteractAs

Interaction mask for "as" behavior.

public MaskTrace InteractAs { get; set; }
Property Value

InteractExclude

Interaction mask to exclude.

public MaskTrace InteractExclude { get; set; }
Property Value

InteractWith

Interaction mask to include.

public MaskTrace InteractWith { get; set; }
Property Value

IterateEntities

Indicates whether entity iteration is enabled for custom filtering.

public bool IterateEntities { get; set; }
Property Value

ObjectQuery

Which object groups should be included by the query.

public RnQueryObjectSet ObjectQuery { get; set; }
Property Value

OwnersToIgnore

Entity owners that should be ignored by the trace.

public List<CEntityInstance> OwnersToIgnore { get; set; }
Property Value

Ray

The ray definition used for tracing shape.

public Ray_t Ray { get; set; }
Property Value

ShouldHitEntity

Optional callback to decide whether an entity should be hit.

public Func<CEntityInstance, bool>? ShouldHitEntity { get; set; }
Property Value

ShouldIgnoreDisabledPairs

Whether disabled collision pairs should be ignored.

public bool ShouldIgnoreDisabledPairs { get; set; }
Property Value

TargetDetailLayer

Target detail layer used by native query shape attributes.

public byte TargetDetailLayer { get; set; }
Property Value

Methods

Builder()

Creates a new fluent builder.

public static TraceParamsBuilder Builder()
Returns

Builder(TraceParams?)

Creates a new fluent builder seeded from an existing parameters object.

public static TraceParamsBuilder Builder(TraceParams? seed)
Parameters
Returns

Clone()

Creates a deep copy of the current parameters.

public TraceParams Clone()
Returns

DefaultLine()

Creates a default parameters instance suitable for most line traces.

public static TraceParams DefaultLine()
Returns

On this page