random road generation
This commit is contained in:
1 parent
b974bbd843
commit
ee223cabfd
56 files changed
+2952
-169
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Track
|
||||
{
|
||||
public class TrackData
|
||||
{
|
||||
public List<Vector3> Waypoints { get; }
|
||||
public Vector3 StartPosition { get; }
|
||||
public Quaternion StartRotation { get; }
|
||||
public Vector3 FinishPosition { get; }
|
||||
|
||||
public TrackData(List<Vector3> waypoints)
|
||||
{
|
||||
Waypoints = new List<Vector3>(waypoints);
|
||||
StartPosition = waypoints[0];
|
||||
StartRotation = Quaternion.LookRotation(waypoints[1] - waypoints[0]);
|
||||
FinishPosition = waypoints[^1];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user