コード例 #1
0
    public CarStatus(CarController c)
    {
        this.name         = c.name;
        this.position     = c.rigidBody.position;
        this.velocity     = c.rigidBody.velocity;
        this.rotation     = c.rigidBody.rotation;
        this.trackSegment = c.raceController.GetTrackSegment(this.name);
        var closestTrackSample = c.ClosestTrackSample(c.raceController.track);

        this.trackAngle = Quaternion.Angle(this.rotation, closestTrackSample.Rotation);
    }