Skip to content

YaTraceMoverComponent

Beta
YaTraceMoverComponent Controls entities trace move

Functions

void StartTrace(YaEntity targetEntity, number speed, TraceMode traceMode, [float3 offset], [number maxTraceTime])
Start Trace Move
void EndTrace()
End Trace Move

Events

TracerReachTargetEvent<void>
Publish when tracer reach the target

Code sample

--Add listener for event
local component = script:GetYaComponent("YaTraceMoverComponent")
EventHelper.AddListener(component,"TracerReachTarget",function())
--Start Trace
local entity = YaEntity.New()
local speed = 3
local offset = float3.New(1,2,3)
local maxTraceTime = 5
component:StartTrace(entity,speed,TraceMode.StopWhenReach,offset,maxTraceTime)