Skip to content

YaTraceMoverComponent

YaTraceMoverComponent makes an object trace a moving object.

Functions

void StartTrace(YaEntity targetEntity, number speed, TraceMode traceMode, float3 offset, number maxTraceTime)
Starts the trace.
  • targetEntity is the target entity to follow.
  • speed is the trace speed (m/s).
  • Tracemode is an enumeration indicating the trace mode, where:
    • NeverTrace Never traces the target entity.
    • StopWhenReach Stops tracing when the distance is less than 0.1 m.
    • ReStartAfterStop Traces again after a trace finishes.
  • Offset specifies the offset from the target entity target.
  • maxTraceTime specifies the maximum time to trace the target entity.
void StartTrace(YaEntity targetEntity, number speed, TraceMode traceMode, float3 offset)
Starts the trace.
void StartTrace(YaEntity targetEntity, number speed, TraceMode traceMode)
Starts the trace.
EndTrace()
Ends the trace.

Events

TracerReachTarget
Triggered when the target entity is reached or time is out. If you stop the trace by calling EndTrace, the event will not be triggered.