L
Size: a a a
L
KM
А
PV
PV
void Start()
{
points = new List<Vector2>
{
this.transform.position,
this.pivotPosition1.position,
this.pivotPosition2.position,
this.targetPosition.position
};
var go = Instantiate<GameObject>(Loot);
BezierPath bezierPath = new BezierPath(points, false, PathSpace.xy);
path = new VertexPath(bezierPath,transform);
ScenePath.bezierPath = bezierPath;
go.GetComponent<LootMover>().Init(path);
Debug.Log(path.ToString());
}
PV
if (_path != null)
{
dstTravelled += speed * Time.deltaTime;
transform.position = _path.GetPointAtDistance(dstTravelled, endInstruction);
}
KM
KM
PV
A
PV
KM
_
KM
PV
PV
IK
_
А