|
|
|
|
|
|
var resetMatrix = WaypointGroup.instance.GetClosestPointOnWaypoint(transform.position); |
|
|
|
var resetPoint = resetMatrix.GetColumn(3); |
|
|
|
resetPoint.y = spawnPosition.GetColumn(3).y; |
|
|
|
transform.SetPositionAndRotation(resetPoint, resetMatrix.rotation); |
|
|
|
engine.RB.position = resetPoint; |
|
|
|
engine.RB.rotation = resetMatrix.rotation; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|