/// <summary> /// ■rigidbody:自分の車のRigidbody /// ■transform:自分の車のtrasnform /// ■wheelParams:タイヤの各状態時の滑り具合 /// </summary> /// <param name="rigidbody"></param> public VehicleMove(Rigidbody rigidbody, Transform transform, WheelParams wheelParams, VehicleSettings.DriftSettings driftSettings, VehicleSettings.SteerSensitivities steerSensitivities) { mRigidbody = rigidbody; mTransform = transform; mWheelParams = wheelParams; mSteeringScript = new SteeringScript(steerSensitivities); mDriftScript = new DriftScript(driftSettings); }
private void OnDrawGizmos() { if (!mGizmoSwitch) { return; } AccessToResources(); AirRide gizmosAirRide = new AirRide(transform, mRayConfig.GetAirRideRayConfig, mVehicleSettings.GetAirRideSettings); DirectionFixRay dirFixRay = new DirectionFixRay(transform, mRayConfig.GetDirectionFixRayConfig); dirFixRay.DrawGizmos(); gizmosAirRide.DrawGizmos(); LRRay lrRay = new LRRay(transform, mRayConfig.GetLRRayConfig); lrRay.DrawRayGizmos(); DriftScript ds = new DriftScript(mVehicleSettings.GetDriftSettings); ds.OnDrawGimos(transform, GetComponent <Rigidbody>()); }