BP_SysyphusChar (Player) – Receives AddWorldOffset / SetWorldLocation(FInterpTo) style moves; maintains spacing/alignment with the Rock.
See details →
key = Spline.FindInputKeyClosestToWorldLocation(worldPos)
dirAtKey = Spline.GetDirectionAtSplineInputKey(key, WorldSpace)
dirNear = Spline.FindDirectionClosestToWorldLocation(worldPos, WorldSpace)
optional: also pull a little toward the spline centerline
closestPos = Spline.FindLocationClosestToWorldLocation(worldPos, WorldSpace)
toCenter = Normalize(closestPos - worldPos)
blend and normalize (weights are tunable)
dir = Normalize( 0.6 * dirAtKey + 0.4 * dirNear + 0.0 * toCenter )
fallback if degenerate
if Length(dir) < 1e-4:
dir = dirNear # or dirAtKey
rot = MakeRotFromX(dir) # or dir.ToRotation()