iRDS - Intelligent Race Driver System  V 2.1.0.5
 All Classes Namespaces Functions Variables Properties Events
IRDSCarControllerAI Class Reference
Inheritance diagram for IRDSCarControllerAI:

Classes

struct  IRDSCopTrails
 

Public Types

enum  SubTrackChooseModes {
  Randomly, Fastest, Shortest, Fastest_and_Shortest,
  All
}
 

Public Member Functions

int GetMyPit ()
 Gets this car current assigned pit number. More...
 
float GetMaxRpms ()
 Gets the max rpms of the car engine. More...
 
void ResetOvertakeOffsets ()
 Resets the overtake offsets. For internal use. More...
 
int GetLap ()
 Gets the current lap of the car on the race. More...
 
float GetPosition ()
 Gets the position. This is not the race position, this is for internal use, it returns the position on the track of the car with respect to the starting line. More...
 
void SetPosition (float position)
 Sets the position. This is not the race position, this is for internal use, it sets the position on the track of the car with respect to the starting line. More...
 
float GetEllapsedTime ()
 Gets the ellapsed time. This method returns the raw float of the last lap time. More...
 
string GetEllapsedTimeString ()
 Gets the ellapsed time string. This method returns a formatted string (00:00:00) of the last lap time. More...
 
float GetCurrentTotalRaceTime ()
 Gets the current total race time. This method can be called on the Update function, and it returns the Current Total ellapsed race time in a float type. More...
 
string GetCurrentTotalRaceTimeString ()
 Gets the current total race time string. This method can be called on the Update function, and it returns the Current Total ellapsed race time in a simple formated string (00:00:00). More...
 
float GetTotalTime ()
 Gets the total time. This method returns the raw float of the total race time, this time is update on every lap, if you need the current elapsed time use GetCurrentLapTime instead. More...
 
string GetTotalTimeString ()
 Gets the total time string. This method returns a formatted string (00:00:00) of the total race time, this time is update on every lap only, if you need the current elapsed time use GetCurrentLapTime instead. More...
 
float GetCurrentLapTime ()
 Gets the current lap time. This method returns the raw float of the current lap time, this method can be called on each update cycle, it is the race timer. More...
 
string GetCurrentLapTimeString ()
 Gets the current lap time string. This method returns a formatted string (00:00:00) of the current lap time, this method can be called on each update cycle, it is the race timer. More...
 
void SetTotalTime (float time)
 Sets the total time. Sets the total time for the race of this car. This is intended for internal use only. More...
 
float GetStartTime ()
 Gets the start time. This method returns the raw float number of the start time for this car. More...
 
string GetStartTimeString ()
 Gets the start time string. This method returns a formatted string (00:00:00) number of the start time for this car. More...
 
IRDSWheel[] GetIRDSWheels ()
 Gets the IRDS wheels. Returns all the IRDSWheel references that this car have. More...
 
int GetCurrentWaypoint ()
 Gets the current waypoint. Returns the current waypoint this car is travelling on and using for the steering. More...
 
int GetCurrentWaypointS ()
 Gets the current waypoint s. Returns the current waypoint this car is travelling on and using as the current nearest waypoint to the car. More...
 
float GetMaxSpeed ()
 Gets the max speed. Returns the current max speed of the current waypoint. More...
 
float GetMaxSpeedEspec (int i)
 Gets the max speed espec. For internal use only. More...
 
bool GetEndRace ()
 Gets the end race. Returns true if this car have ended the race. More...
 
void SetEndRace (bool flag)
 Sets the end race. This is for internal use, but can be used to force a car to be on the end race state. More...
 
Transform GetCenter ()
 Gets the center. This returns a dummy transform that have the actual center of the car. More...
 
float GetCarDepth ()
 Gets the car depth. Returns the Length of the car in meters. More...
 
float GetCarWidth ()
 Gets the width of the car. More...
 
float GetCarSpeed ()
 Gets the car speed. Returns the actual car speed, this is the same as calling IRDSCarControllInput.GetCarSpeed() from the instance of that class. More...
 
float GetTopSpeed ()
 Gets the top speed. Returns the top car speed, this is the same as calling IRDSCarControllInput.GetTopSpeed() from the instance of that class. More...
 
IRDSCarControllInput GetCarInputs ()
 Gets the car inputs. Returns the reference to the IRDSCarControllInput class. More...
 
void SetLap (int lap)
 Sets the lap. This is for internal use only. More...
 
string GetCarName ()
 Gets the name of the car. More...
 
string GetDriverName ()
 Gets the name of the driver. More...
 
void SetUnstuckTime (float time)
 Sets the unstuck time. More...
 
void SetRespawnTimer (float time)
 Sets the respawn timer. More...
 
void SetStartTime (float time)
 Sets the start time. This is for internal use only. More...
 
float GetFastestLapTime ()
 Gets the fastest lap time. This returns the raw float of the best/fastest lap time. More...
 
string GetFastestLapTimeString ()
 Gets the fastest lap time string. This returns a formatted string (00:00:00) of the best/fastest lap time. More...
 
float GetAggressivenessOnBrake ()
 Gets the aggressiveness on brake. Gets the value of the aggressiveness on brake for this AI. More...
 
void SetAggressivenessOnBrake (float aggressivenessOnBrake)
 Sets the aggressiveness on brake. Sets the value of the aggressiveness on brake for this AI, values lower than 1 would make the AI brake more closer to the corners and higher values would make it brake earlier. More...
 
float GetSpeedSteeringFactor ()
 Gets the speed steering factor. More...
 
void SetSpeedSteeringFactor (float speedSteeringFac)
 Sets the speed steering factor. More...
 
float GetLookahead_factor ()
 Gets the lookahead_factor. More...
 
void SetLookahead_factor (float Lookahead_factor)
 Sets the lookahead_factor. More...
 
float GetCorneringSpeedFactor ()
 Gets the cornering speed factor. More...
 
void SetCorneringSpeedFactor (float corneringSpeedFactor)
 Sets the cornering speed factor. More...
 
float GetMaxDriftAngle ()
 Gets the max drift angle. More...
 
void SetMaxDriftAngle (float maxDriftAng)
 Sets the max drift angle. More...
 
float GetSteeringDriftFactor ()
 Gets the steering drift factor. More...
 
void SetSteeringDriftFactor (float steeringDriftFac)
 Sets the steering drift factor. More...
 
float GetCollisionSideFactor ()
 Gets the collision side factor. More...
 
void SetCollisionSideFactor (float collisionSideFac)
 Sets the collision side factor. More...
 
float GetOvertakeFactor ()
 Gets the overtake factor. More...
 
void SetOvertakeFactor (float overtakeFac)
 Sets the overtake factor. More...
 
float GetOvertakeSpeedDiference ()
 Gets the overtake speed diference. More...
 
void SetOvertakeSpeedDiference (float overtakeSpeedDif)
 Sets the overtake speed diference. More...
 
float GetHumanError ()
 Gets the human error. More...
 
void SetHumanError (float humanErr)
 Sets the human error. More...
 
float GetOvertakeOffsetIncrementMin ()
 Gets the overtake offset increment minimum. More...
 
void SetOvertakeOffsetIncrementMin (float overtakeOffsetIncMin)
 Sets the overtake offset increment minimum. More...
 
float GetOvertakeOffsetIncrementMax ()
 Gets the overtake offset increment max. More...
 
void SetOvertakeOffsetIncrementMax (float overtakeOffsetIncMax)
 Sets the overtake offset increment max. More...
 
float GetShifFactor ()
 Gets the shif factor. More...
 
void SetShifFactor (float shifFac)
 Sets the shif factor. More...
 
float GetFuelTankCapacity ()
 Gets the fuel tank capacity. More...
 
void SetFuelTankCapacity (float fuelTankCap)
 Sets the fuel tank capacity. More...
 
float GetTyrechangePorcentage ()
 Gets the tyrechange porcentage. More...
 
void SetTyrechangePorcentage (float tyrechangePorcent)
 Sets the tyrechange porcentage. More...
 
float GetFuelloadPorcentage ()
 Gets the fuelload porcentage. More...
 
void SetFuelloadPorcentage (float fuelloadPorcent)
 Sets the fuelload porcentage. More...
 
float GetFullAccelMaring ()
 Gets the full accel maring. More...
 
void SetFullAccelMaring (float fullAccelMaring)
 Sets the full accel maring. More...
 
float GetFrontCollDist ()
 Gets the front coll dist. More...
 
void SetFrontCollDist (float frontCollD)
 Sets the front coll dist. More...
 
float GetBackCollDist ()
 Gets the back coll dist. More...
 
void SetBackCollDist (float backCollD)
 Sets the back coll dist. More...
 
float GetSideMargin ()
 Gets the side margin. More...
 
void SetSideMargin (float sideMar)
 Sets the side margin. More...
 
float GetHeightMargin ()
 Gets the height margin. More...
 
void SetHeightMargin (float heightMar)
 Sets the height margin. More...
 
float GetLength_Margin ()
 Gets the length_ margin. More...
 
void SetLength_Margin (float length_margin)
 Sets the length_ margin. More...
 
float GetSide_Margin ()
 Gets the side_ margin. More...
 
void SetSide_Margin (float Side_Margin)
 Sets the side_ margin. More...
 
void GetCarSize ()
 Gets the size of the car. More...
 
bool GetIsOvertaking ()
 Gets the is overtaking. More...
 
bool GetIsAvoidingOpponentSideways ()
 Gets the is avoiding opponent sideways. More...
 
bool GetIsBrakingOnOpponent ()
 Gets the is braking on opponent. More...
 
bool GetWrongWay ()
 Gets the wrong way. More...
 
bool GetStucked ()
 Gets the stucked. More...
 
void SetStucked (bool val)
 Sets the stucked. More...
 
float GetDriftAngle ()
 Gets the drift angle. More...
 
IRDSManager GetManager ()
 Gets the manager. More...
 
void SetMaxSteerLockExternalPhysics (float value)
 Sets the max steer lock external physics. More...
 
float GetMaxSteerLockExternalPhysics ()
 Gets the max steer lock external physics. More...
 
void SetGravity (float value)
 Sets the gravity. More...
 
void SetDriverName (string newName)
 Sets the name of the driver. More...
 
float GetLapCompletionPercentage ()
 Gets the lap completion percentage, it returns a value from 0 to 1, 0 means its the starting point of the race and 1 the end point of the race. More...
 
void SetFrictionExtaernalPhysics (float[] value)
 Sets the friction extaernal physics. More...
 
void SetHFactorExternalPhysics (float value)
 Sets the H factor external physics. More...
 
void SetClFactorExternalPhysics (float value)
 Sets the cl factor external physics. More...
 
void SetCWFactorExternalPhysics (float value)
 Sets the CW factor external physics. More...
 
void SetWingaFactorExternalPhysics (float value)
 Sets the winga factor external physics. More...
 
void SetTireSlipAngleExternalPhysics (bool value)
 Sets the tire slip angle external physics. More...
 
void SetTyreWearExternalPhysics (float value)
 Sets the tyre wear external physics. More...
 
IRDSNavigateTWaypoints GetNavigateTWaypoints ()
 Gets the IRDSNavigateTWaypoints class reference of this car instance. More...
 
delegate void OnRaceEnd ()
 
delegate void OnLapCompleted ()
 
delegate void OnLapCompletedValue (int lap)
 
delegate void OnRaceStart ()
 
delegate void OnRespawn ()
 
delegate void OnUnstuck ()
 
delegate void OnUnStucked ()
 
void Initialize ()
 Initialize this instance. More...
 
float GetMaxSpeed (int i, float Radius, ref List< Transform > Waypoints, ref float[] bankedAngle)
 
float GetMaxSpeed (int i, float Radius, ref List< Transform > Waypoints)
 
float GetLookahead ()
 
bool pitting ()
 
void FinishPitting ()
 Finishes the pitting. This is used only for third party physics, like unity car and edys, since the iRDS physics handles this automatically. More...
 
void IRDSWheelsCenter (Transform[] frontWheels)
 
void TimerStart ()
 
void getEllapsedTime ()
 
bool FlipCar ()
 
void RespawnAtWaypoint (int waypointToRespawn, bool useRelativePosition, bool resetSpeedToZero)
 
void EnableSpeedRestriction (int firstWaypoint, int lastWaypoint, bool flag, float speedLimit)
 
void DisableSpeedRestriction ()
 
void UpdateOppQuantity ()
 

Public Attributes

bool respawn = true
 The respawn. More...
 
bool respawnAtWP = true
 The respawn at W. More...
 
float resetTime = 1.0f
 The reset time. More...
 
float resetTimer = 0.0f
 The reset timer. More...
 
float fastestLapTime = 0
 The fastest lap time. More...
 
bool yellowFlag = false
 The yellow flag. More...
 
bool blueFlag = false
 The blue flag. More...
 
int firstWaypointSpdRest = 0
 The first waypoint spd rest. More...
 
int lastWaypointSpdRest = 0
 The last waypoint spd rest. More...
 
float spdLimit = 0
 The spd limit. More...
 
bool driveThroughPits = false
 The drive through pits. More...
 
bool chargeFuel = true
 The charge fuel. More...
 
bool changeFrontTires = true
 The change front tires. More...
 
bool changeRearTires = true
 The change rear tires. More...
 
bool threeWideStyle = false
 The three wide style. More...
 
float[] lastOvertakeTime
 The last overtake time. More...
 
float backToLineIncrement = 0.01f
 The back to line increment. More...
 
bool wrongWay = false
 The wrong way. More...
 
bool pitsAutopilot = true
 The pits autopilot. More...
 
float pitsTime = 15
 The pits time. More...
 
float tireBrakeForce = 0
 The tire brake force. More...
 
float CW
 The C. More...
 
bool tireSlipRatio = false
 The tire slip ratio. More...
 
List< IRDSobstaclesInRangeobstaclesInRange = new List<IRDSobstaclesInRange>()
 The obstacles in range. More...
 
bool[] obstacleIsInRange
 The obstacle is in range. More...
 
bool autoSteering = false
 The auto steering. More...
 
bool autoThrottle = false
 The auto throttle. More...
 
bool autoBrake = false
 The auto brake. More...
 
int playerNumber = -1
 The player number. More...
 
int racePosition = 0
 The race position. More...
 
int myGridPosition = 0
 My grid position. More...
 
bool copMode = false
 The cop mode. More...
 
bool copTargetBehind = false
 The cop target behind. More...
 
float copAgressivenessMultiplier = 1f
 The cop agressiveness multiplier. More...
 
float copBrakeRange = 10f
 The cop brake range. More...
 
bool copHitBrakes = false
 The cop hit brakes. More...
 
bool copPatrolMode = false
 The cop patrol mode. More...
 
float copPatrolSpeed = 27f
 The cop patrol speed. More...
 
IRDSCarControllerAI copCurrentTarget
 The cop current target. More...
 
float copTargetDist = 0f
 The cop target dist. More...
 
float copLockOnDistance = 5f
 The cop lock on distance. More...
 
List< IRDSCopTrailscopTrail = new List<IRDSCopTrails>()
 The cop trail. More...
 
Transform currentTrail
 The current trail. More...
 
SubTrackChooseModes subTrackChoosedMode = SubTrackChooseModes.Fastest
 The sub track choosed mode. More...
 
float raceStartTime
 The race start time. More...
 
float checkPointTimer =50
 The check point timer. More...
 
float checkPointTimeLeft =0f
 The check point time left. More...
 
int currentCheckPoint = 0
 The current check point. More...
 
float lastManStandingTimeLeft =0f
 The last man standing time left. More...
 
float speedTrapPoints = 0f
 The speed trap points. More...
 
bool haveTheFlag = false
 The have the flag. More...
 
bool hitObject = false
 The hit object. More...
 
GameObject flag
 The flag. More...
 
bool enableDAC = false
 The enable DA. More...
 
float targetDistanceFromPlayer = 15f
 The target distance from player. More...
 
float minAgressivenesOnBrakeDAC = 0.5f
 The minimum agressivenes on brake DA. More...
 
float maxAgressivenesOnBrakeDAC = 1f
 The max agressivenes on brake DA. More...
 
float minCorneringSpeedFactorDAC = 1f
 The minimum cornering speed factor DA. More...
 
float maxCorneringSpeedFactorDAC = 2f
 The max cornering speed factor DA. More...
 
float CorneringSpeedFactorDAC =1
 The cornering speed factor DA. More...
 
int player1IndexDAC = -1
 The player1 index DA. More...
 
float targetDistanceFromPlayerThreshold = 25f
 The target distance from player threshold. More...
 
float shiftUpFactor = 0.95f
 The shift up factor. More...
 
float respawnSpeed = 15
 The respawn speed. More...
 
bool alwaysRespawn = false
 The always respawn. More...
 
IRDSobstaclesInRange obstacle1 = new IRDSobstaclesInRange()
 The obstacle1. More...
 
float LookAheadConst = 10f
 The look ahead const. More...
 
float offTrackThrottleMulpilier = 1f
 The off track throttle mulpilier. More...
 
float jumpThrottleMulpilier = 1f
 The jump throttle mulpilier. More...
 
float jumpThrottleTime = 0.5f
 The jump throttle time. More...
 
float jumpThrottleTimer = 0f
 The jump throttle timer. More...
 
bool wasJumping = false
 The was jumping. More...
 
bool overrideNitroInput = false
 The override nitro input. More...
 
bool originalAutoBrake = false
 The original auto brake. More...
 
bool alreadyPit = false
 The already pit. More...
 
bool isPitting = false
 The is pitting. More...
 
float lookAheadDistance = 0f
 The look ahead distance. More...
 
bool isNetworkCar = false
 is this a network car? this would help when using PUN framework More...
 
bool isExternalCarPhysics = false
 The is external car physics. More...
 
Texture2D myIcon
 My icon. More...
 
float respawnHeight = 0.5f
 The height of the respawn. More...
 
float respawnOutOfLimitMaxDistance = 0f
 The respawn out of limit max distance. If this is set to 0 it would be disabled, other wise the cars would be respawned if they get their distance from the racing line higher than this distance. More...
 
IRDSStatistics stats
 The stats. More...
 
float captureTheFlagHitStrength = 1f
 The capture the flag hit strength. More...
 
float lastTimeWithFlag = 0f
 The last time with flag. More...
 
bool rollingStart = true
 Rolling start. This is for internal use only!, this is set by the System if rolling start have been selected as the race start type. More...
 
bool ignoreBankedAngle = false
 The ignore banked angle. This is for internal use only. More...
 
float speedOverride = 0f
 The speed override. Set this variable to the desired speed(m/s) you want the AI to run at. The speed is in meters per seconds. More...
 
OnRaceStart onRaceStart
 The on race start callback. This callback is called once for each car instance. More...
 
OnLapCompleted onLapCompleted
 The on lap completed callback. This callback is called once each time a lap is completed. More...
 
OnLapCompletedValue onLapCompletedValue
 The on lap completed value. This is the same as onLapCompleted but also sends the current lap as parameter. More...
 
OnRaceEnd onRaceEnd
 The on race end callback. This callback is called once when this car instance ends the race. More...
 
OnRespawn onRespawn
 The on respawn callback. This callback is called once when this car instance is respawned. More...
 
OnUnstuck onUnstuck
 The on unstuck callback. This callback is called once when the AI is getting unstuck. More...
 
OnUnStucked onUnStucked
 The on Unstucked callback. This callback is called once when the AI is Unstucked. More...
 

Properties

bool IsPlayer [get, set]
 Gets or sets a value indicating whether this instance is player. More...
 

Member Function Documentation

void IRDSCarControllerAI.FinishPitting ( )

Finishes the pitting. This is used only for third party physics, like unity car and edys, since the iRDS physics handles this automatically.

float IRDSCarControllerAI.GetAggressivenessOnBrake ( )

Gets the aggressiveness on brake. Gets the value of the aggressiveness on brake for this AI.

Returns
The aggressiveness on brake.
float IRDSCarControllerAI.GetBackCollDist ( )

Gets the back coll dist.

Returns
The back coll dist.
float IRDSCarControllerAI.GetCarDepth ( )

Gets the car depth. Returns the Length of the car in meters.

Returns
The car depth.
IRDSCarControllInput IRDSCarControllerAI.GetCarInputs ( )

Gets the car inputs. Returns the reference to the IRDSCarControllInput class.

Returns
The car inputs.
string IRDSCarControllerAI.GetCarName ( )

Gets the name of the car.

Returns
The car name.
void IRDSCarControllerAI.GetCarSize ( )

Gets the size of the car.

float IRDSCarControllerAI.GetCarSpeed ( )

Gets the car speed. Returns the actual car speed, this is the same as calling IRDSCarControllInput.GetCarSpeed() from the instance of that class.

Returns
The car speed.
float IRDSCarControllerAI.GetCarWidth ( )

Gets the width of the car.

Returns
The car width.

Brief description: This Method gets the car width based on its colliders

Transform IRDSCarControllerAI.GetCenter ( )

Gets the center. This returns a dummy transform that have the actual center of the car.

Returns
The center.
float IRDSCarControllerAI.GetCollisionSideFactor ( )

Gets the collision side factor.

Returns
The collision side factor.
float IRDSCarControllerAI.GetCorneringSpeedFactor ( )

Gets the cornering speed factor.

Returns
The cornering speed factor.
float IRDSCarControllerAI.GetCurrentLapTime ( )

Gets the current lap time. This method returns the raw float of the current lap time, this method can be called on each update cycle, it is the race timer.

Returns
The current lap time.
string IRDSCarControllerAI.GetCurrentLapTimeString ( )

Gets the current lap time string. This method returns a formatted string (00:00:00) of the current lap time, this method can be called on each update cycle, it is the race timer.

Returns
The current lap time string.
float IRDSCarControllerAI.GetCurrentTotalRaceTime ( )

Gets the current total race time. This method can be called on the Update function, and it returns the Current Total ellapsed race time in a float type.

Returns
The current total race time.
string IRDSCarControllerAI.GetCurrentTotalRaceTimeString ( )

Gets the current total race time string. This method can be called on the Update function, and it returns the Current Total ellapsed race time in a simple formated string (00:00:00).

Returns
The current total race time string.
int IRDSCarControllerAI.GetCurrentWaypoint ( )

Gets the current waypoint. Returns the current waypoint this car is travelling on and using for the steering.

Returns
The current waypoint.
int IRDSCarControllerAI.GetCurrentWaypointS ( )

Gets the current waypoint s. Returns the current waypoint this car is travelling on and using as the current nearest waypoint to the car.

Returns
The current waypoint s.
float IRDSCarControllerAI.GetDriftAngle ( )

Gets the drift angle.

Returns
The drift angle.
string IRDSCarControllerAI.GetDriverName ( )

Gets the name of the driver.

Returns
The driver name.
float IRDSCarControllerAI.GetEllapsedTime ( )

Gets the ellapsed time. This method returns the raw float of the last lap time.

Returns
The ellapsed time.
string IRDSCarControllerAI.GetEllapsedTimeString ( )

Gets the ellapsed time string. This method returns a formatted string (00:00:00) of the last lap time.

Returns
The ellapsed time string.
bool IRDSCarControllerAI.GetEndRace ( )

Gets the end race. Returns true if this car have ended the race.

Returns
true, if end race was gotten, false otherwise.
float IRDSCarControllerAI.GetFastestLapTime ( )

Gets the fastest lap time. This returns the raw float of the best/fastest lap time.

Returns
The fastest lap time.
string IRDSCarControllerAI.GetFastestLapTimeString ( )

Gets the fastest lap time string. This returns a formatted string (00:00:00) of the best/fastest lap time.

Returns
The fastest lap time string.
float IRDSCarControllerAI.GetFrontCollDist ( )

Gets the front coll dist.

Returns
The front coll dist.
float IRDSCarControllerAI.GetFuelloadPorcentage ( )

Gets the fuelload porcentage.

Returns
The fuelload porcentage.
float IRDSCarControllerAI.GetFuelTankCapacity ( )

Gets the fuel tank capacity.

Returns
The fuel tank capacity.
float IRDSCarControllerAI.GetFullAccelMaring ( )

Gets the full accel maring.

Returns
The full accel maring.
float IRDSCarControllerAI.GetHeightMargin ( )

Gets the height margin.

Returns
The height margin.
float IRDSCarControllerAI.GetHumanError ( )

Gets the human error.

Returns
The human error.
IRDSWheel [] IRDSCarControllerAI.GetIRDSWheels ( )

Gets the IRDS wheels. Returns all the IRDSWheel references that this car have.

Returns
The IRDS wheels.
bool IRDSCarControllerAI.GetIsAvoidingOpponentSideways ( )

Gets the is avoiding opponent sideways.

Returns
true, if is avoiding opponent sideways was gotten, false otherwise.
bool IRDSCarControllerAI.GetIsBrakingOnOpponent ( )

Gets the is braking on opponent.

Returns
true, if is braking on opponent was gotten, false otherwise.
bool IRDSCarControllerAI.GetIsOvertaking ( )

Gets the is overtaking.

Returns
true, if is overtaking was gotten, false otherwise.
int IRDSCarControllerAI.GetLap ( )

Gets the current lap of the car on the race.

Returns
The lap.
float IRDSCarControllerAI.GetLapCompletionPercentage ( )

Gets the lap completion percentage, it returns a value from 0 to 1, 0 means its the starting point of the race and 1 the end point of the race.

Returns
The lap completion percentage.
float IRDSCarControllerAI.GetLength_Margin ( )

Gets the length_ margin.

Returns
The length_ margin.
float IRDSCarControllerAI.GetLookahead_factor ( )

Gets the lookahead_factor.

Returns
The lookahead_factor.
IRDSManager IRDSCarControllerAI.GetManager ( )

Gets the manager.

Returns
The manager.
float IRDSCarControllerAI.GetMaxDriftAngle ( )

Gets the max drift angle.

Returns
The max drift angle.
float IRDSCarControllerAI.GetMaxRpms ( )

Gets the max rpms of the car engine.

Returns
The max rpms.
float IRDSCarControllerAI.GetMaxSpeed ( )

Gets the max speed. Returns the current max speed of the current waypoint.

Returns
The max speed.
float IRDSCarControllerAI.GetMaxSpeedEspec ( int  i)

Gets the max speed espec. For internal use only.

Returns
The max speed espec.
Parameters
iThe index.
float IRDSCarControllerAI.GetMaxSteerLockExternalPhysics ( )

Gets the max steer lock external physics.

Returns
The max steer lock external physics.
int IRDSCarControllerAI.GetMyPit ( )

Gets this car current assigned pit number.

Returns
The pit number assigned to this car.
IRDSNavigateTWaypoints IRDSCarControllerAI.GetNavigateTWaypoints ( )

Gets the IRDSNavigateTWaypoints class reference of this car instance.

Returns
The navigate T waypoints.
float IRDSCarControllerAI.GetOvertakeFactor ( )

Gets the overtake factor.

Returns
The overtake factor.
float IRDSCarControllerAI.GetOvertakeOffsetIncrementMax ( )

Gets the overtake offset increment max.

Returns
The overtake offset increment max.
float IRDSCarControllerAI.GetOvertakeOffsetIncrementMin ( )

Gets the overtake offset increment minimum.

Returns
The overtake offset increment minimum.
float IRDSCarControllerAI.GetOvertakeSpeedDiference ( )

Gets the overtake speed diference.

Returns
The overtake speed diference.
float IRDSCarControllerAI.GetPosition ( )

Gets the position. This is not the race position, this is for internal use, it returns the position on the track of the car with respect to the starting line.

Returns
The position.
float IRDSCarControllerAI.GetShifFactor ( )

Gets the shif factor.

Returns
The shif factor.
float IRDSCarControllerAI.GetSide_Margin ( )

Gets the side_ margin.

Returns
The side_ margin.
float IRDSCarControllerAI.GetSideMargin ( )

Gets the side margin.

Returns
The side margin.
float IRDSCarControllerAI.GetSpeedSteeringFactor ( )

Gets the speed steering factor.

Returns
The speed steering factor.
float IRDSCarControllerAI.GetStartTime ( )

Gets the start time. This method returns the raw float number of the start time for this car.

Returns
The start time.
string IRDSCarControllerAI.GetStartTimeString ( )

Gets the start time string. This method returns a formatted string (00:00:00) number of the start time for this car.

Returns
The start time string.
float IRDSCarControllerAI.GetSteeringDriftFactor ( )

Gets the steering drift factor.

Returns
The steering drift factor.
bool IRDSCarControllerAI.GetStucked ( )

Gets the stucked.

Returns
true, if stucked was gotten, false otherwise.
float IRDSCarControllerAI.GetTopSpeed ( )

Gets the top speed. Returns the top car speed, this is the same as calling IRDSCarControllInput.GetTopSpeed() from the instance of that class.

Returns
The top speed.
float IRDSCarControllerAI.GetTotalTime ( )

Gets the total time. This method returns the raw float of the total race time, this time is update on every lap, if you need the current elapsed time use GetCurrentLapTime instead.

Returns
The total time.
string IRDSCarControllerAI.GetTotalTimeString ( )

Gets the total time string. This method returns a formatted string (00:00:00) of the total race time, this time is update on every lap only, if you need the current elapsed time use GetCurrentLapTime instead.

Returns
The total time string.
float IRDSCarControllerAI.GetTyrechangePorcentage ( )

Gets the tyrechange porcentage.

Returns
The tyrechange porcentage.
bool IRDSCarControllerAI.GetWrongWay ( )

Gets the wrong way.

Returns
true, if wrong way was gotten, false otherwise.
void IRDSCarControllerAI.Initialize ( )

Initialize this instance.

void IRDSCarControllerAI.ResetOvertakeOffsets ( )

Resets the overtake offsets. For internal use.

void IRDSCarControllerAI.SetAggressivenessOnBrake ( float  aggressivenessOnBrake)

Sets the aggressiveness on brake. Sets the value of the aggressiveness on brake for this AI, values lower than 1 would make the AI brake more closer to the corners and higher values would make it brake earlier.

Parameters
aggressivenessOnBrakeAggressiveness on brake.
void IRDSCarControllerAI.SetBackCollDist ( float  backCollD)

Sets the back coll dist.

Parameters
backCollDBack coll d.
void IRDSCarControllerAI.SetClFactorExternalPhysics ( float  value)

Sets the cl factor external physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetCollisionSideFactor ( float  collisionSideFac)

Sets the collision side factor.

Parameters
collisionSideFacCollision side fac.
void IRDSCarControllerAI.SetCorneringSpeedFactor ( float  corneringSpeedFactor)

Sets the cornering speed factor.

Parameters
corneringSpeedFactorCornering speed factor.
void IRDSCarControllerAI.SetCWFactorExternalPhysics ( float  value)

Sets the CW factor external physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetDriverName ( string  newName)

Sets the name of the driver.

Parameters
newNameNew name.
void IRDSCarControllerAI.SetEndRace ( bool  flag)

Sets the end race. This is for internal use, but can be used to force a car to be on the end race state.

Parameters
flagIf set to true flag.
void IRDSCarControllerAI.SetFrictionExtaernalPhysics ( float[]  value)

Sets the friction extaernal physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetFrontCollDist ( float  frontCollD)

Sets the front coll dist.

Parameters
frontCollDFront coll d.
void IRDSCarControllerAI.SetFuelloadPorcentage ( float  fuelloadPorcent)

Sets the fuelload porcentage.

Parameters
fuelloadPorcentFuelload porcent.
void IRDSCarControllerAI.SetFuelTankCapacity ( float  fuelTankCap)

Sets the fuel tank capacity.

Parameters
fuelTankCapFuel tank cap.
void IRDSCarControllerAI.SetFullAccelMaring ( float  fullAccelMaring)

Sets the full accel maring.

Parameters
fullAccelMaringFull accel maring.
void IRDSCarControllerAI.SetGravity ( float  value)

Sets the gravity.

Parameters
valueValue.
void IRDSCarControllerAI.SetHeightMargin ( float  heightMar)

Sets the height margin.

Parameters
heightMarHeight mar.
void IRDSCarControllerAI.SetHFactorExternalPhysics ( float  value)

Sets the H factor external physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetHumanError ( float  humanErr)

Sets the human error.

Parameters
humanErrHuman error.
void IRDSCarControllerAI.SetLap ( int  lap)

Sets the lap. This is for internal use only.

Parameters
lapLap.
void IRDSCarControllerAI.SetLength_Margin ( float  length_margin)

Sets the length_ margin.

Parameters
length_marginLength_margin.
void IRDSCarControllerAI.SetLookahead_factor ( float  Lookahead_factor)

Sets the lookahead_factor.

Parameters
Lookahead_factorLookahead_factor.
void IRDSCarControllerAI.SetMaxDriftAngle ( float  maxDriftAng)

Sets the max drift angle.

Parameters
maxDriftAngMax drift ang.
void IRDSCarControllerAI.SetMaxSteerLockExternalPhysics ( float  value)

Sets the max steer lock external physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetOvertakeFactor ( float  overtakeFac)

Sets the overtake factor.

Parameters
overtakeFacOvertake fac.
void IRDSCarControllerAI.SetOvertakeOffsetIncrementMax ( float  overtakeOffsetIncMax)

Sets the overtake offset increment max.

Parameters
overtakeOffsetIncMaxOvertake offset inc max.
void IRDSCarControllerAI.SetOvertakeOffsetIncrementMin ( float  overtakeOffsetIncMin)

Sets the overtake offset increment minimum.

Parameters
overtakeOffsetIncMinOvertake offset inc minimum.
void IRDSCarControllerAI.SetOvertakeSpeedDiference ( float  overtakeSpeedDif)

Sets the overtake speed diference.

Parameters
overtakeSpeedDifOvertake speed dif.
void IRDSCarControllerAI.SetPosition ( float  position)

Sets the position. This is not the race position, this is for internal use, it sets the position on the track of the car with respect to the starting line.

Parameters
positionPosition.
void IRDSCarControllerAI.SetRespawnTimer ( float  time)

Sets the respawn timer.

Parameters
timeTime.
void IRDSCarControllerAI.SetShifFactor ( float  shifFac)

Sets the shif factor.

Parameters
shifFacShif fac.
void IRDSCarControllerAI.SetSide_Margin ( float  Side_Margin)

Sets the side_ margin.

Parameters
Side_MarginSide_ margin.
void IRDSCarControllerAI.SetSideMargin ( float  sideMar)

Sets the side margin.

Parameters
sideMarSide mar.
void IRDSCarControllerAI.SetSpeedSteeringFactor ( float  speedSteeringFac)

Sets the speed steering factor.

Parameters
speedSteeringFacSpeed steering fac.
void IRDSCarControllerAI.SetStartTime ( float  time)

Sets the start time. This is for internal use only.

Parameters
timeTime.
void IRDSCarControllerAI.SetSteeringDriftFactor ( float  steeringDriftFac)

Sets the steering drift factor.

Parameters
steeringDriftFacSteering drift fac.
void IRDSCarControllerAI.SetStucked ( bool  val)

Sets the stucked.

Parameters
valIf set to true value.
void IRDSCarControllerAI.SetTireSlipAngleExternalPhysics ( bool  value)

Sets the tire slip angle external physics.

Parameters
valueIf set to true value.
void IRDSCarControllerAI.SetTotalTime ( float  time)

Sets the total time. Sets the total time for the race of this car. This is intended for internal use only.

Parameters
timeTime.
void IRDSCarControllerAI.SetTyrechangePorcentage ( float  tyrechangePorcent)

Sets the tyrechange porcentage.

Parameters
tyrechangePorcentTyrechange porcent.
void IRDSCarControllerAI.SetTyreWearExternalPhysics ( float  value)

Sets the tyre wear external physics.

Parameters
valueValue.
void IRDSCarControllerAI.SetUnstuckTime ( float  time)

Sets the unstuck time.

Parameters
timeTime.
void IRDSCarControllerAI.SetWingaFactorExternalPhysics ( float  value)

Sets the winga factor external physics.

Parameters
valueValue.

Member Data Documentation

bool IRDSCarControllerAI.alreadyPit = false

The already pit.

bool IRDSCarControllerAI.alwaysRespawn = false

The always respawn.

bool IRDSCarControllerAI.autoBrake = false

The auto brake.

bool IRDSCarControllerAI.autoSteering = false

The auto steering.

bool IRDSCarControllerAI.autoThrottle = false

The auto throttle.

float IRDSCarControllerAI.backToLineIncrement = 0.01f

The back to line increment.

bool IRDSCarControllerAI.blueFlag = false

The blue flag.

float IRDSCarControllerAI.captureTheFlagHitStrength = 1f

The capture the flag hit strength.

bool IRDSCarControllerAI.changeFrontTires = true

The change front tires.

bool IRDSCarControllerAI.changeRearTires = true

The change rear tires.

bool IRDSCarControllerAI.chargeFuel = true

The charge fuel.

float IRDSCarControllerAI.checkPointTimeLeft =0f

The check point time left.

float IRDSCarControllerAI.checkPointTimer =50

The check point timer.

float IRDSCarControllerAI.copAgressivenessMultiplier = 1f

The cop agressiveness multiplier.

float IRDSCarControllerAI.copBrakeRange = 10f

The cop brake range.

IRDSCarControllerAI IRDSCarControllerAI.copCurrentTarget

The cop current target.

bool IRDSCarControllerAI.copHitBrakes = false

The cop hit brakes.

float IRDSCarControllerAI.copLockOnDistance = 5f

The cop lock on distance.

bool IRDSCarControllerAI.copMode = false

The cop mode.

bool IRDSCarControllerAI.copPatrolMode = false

The cop patrol mode.

float IRDSCarControllerAI.copPatrolSpeed = 27f

The cop patrol speed.

bool IRDSCarControllerAI.copTargetBehind = false

The cop target behind.

float IRDSCarControllerAI.copTargetDist = 0f

The cop target dist.

List<IRDSCopTrails> IRDSCarControllerAI.copTrail = new List<IRDSCopTrails>()

The cop trail.

float IRDSCarControllerAI.CorneringSpeedFactorDAC =1

The cornering speed factor DA.

int IRDSCarControllerAI.currentCheckPoint = 0

The current check point.

Transform IRDSCarControllerAI.currentTrail

The current trail.

float IRDSCarControllerAI.CW

The C.

bool IRDSCarControllerAI.driveThroughPits = false

The drive through pits.

bool IRDSCarControllerAI.enableDAC = false

The enable DA.

float IRDSCarControllerAI.fastestLapTime = 0

The fastest lap time.

int IRDSCarControllerAI.firstWaypointSpdRest = 0

The first waypoint spd rest.

GameObject IRDSCarControllerAI.flag

The flag.

bool IRDSCarControllerAI.haveTheFlag = false

The have the flag.

bool IRDSCarControllerAI.hitObject = false

The hit object.

bool IRDSCarControllerAI.ignoreBankedAngle = false

The ignore banked angle. This is for internal use only.

bool IRDSCarControllerAI.isExternalCarPhysics = false

The is external car physics.

bool IRDSCarControllerAI.isNetworkCar = false

is this a network car? this would help when using PUN framework

bool IRDSCarControllerAI.isPitting = false

The is pitting.

float IRDSCarControllerAI.jumpThrottleMulpilier = 1f

The jump throttle mulpilier.

float IRDSCarControllerAI.jumpThrottleTime = 0.5f

The jump throttle time.

float IRDSCarControllerAI.jumpThrottleTimer = 0f

The jump throttle timer.

float IRDSCarControllerAI.lastManStandingTimeLeft =0f

The last man standing time left.

float [] IRDSCarControllerAI.lastOvertakeTime

The last overtake time.

float IRDSCarControllerAI.lastTimeWithFlag = 0f

The last time with flag.

int IRDSCarControllerAI.lastWaypointSpdRest = 0

The last waypoint spd rest.

float IRDSCarControllerAI.LookAheadConst = 10f

The look ahead const.

float IRDSCarControllerAI.lookAheadDistance = 0f

The look ahead distance.

float IRDSCarControllerAI.maxAgressivenesOnBrakeDAC = 1f

The max agressivenes on brake DA.

float IRDSCarControllerAI.maxCorneringSpeedFactorDAC = 2f

The max cornering speed factor DA.

float IRDSCarControllerAI.minAgressivenesOnBrakeDAC = 0.5f

The minimum agressivenes on brake DA.

float IRDSCarControllerAI.minCorneringSpeedFactorDAC = 1f

The minimum cornering speed factor DA.

int IRDSCarControllerAI.myGridPosition = 0

My grid position.

Texture2D IRDSCarControllerAI.myIcon

My icon.

IRDSobstaclesInRange IRDSCarControllerAI.obstacle1 = new IRDSobstaclesInRange()

The obstacle1.

bool [] IRDSCarControllerAI.obstacleIsInRange

The obstacle is in range.

List<IRDSobstaclesInRange> IRDSCarControllerAI.obstaclesInRange = new List<IRDSobstaclesInRange>()

The obstacles in range.

float IRDSCarControllerAI.offTrackThrottleMulpilier = 1f

The off track throttle mulpilier.

OnLapCompleted IRDSCarControllerAI.onLapCompleted

The on lap completed callback. This callback is called once each time a lap is completed.

OnLapCompletedValue IRDSCarControllerAI.onLapCompletedValue

The on lap completed value. This is the same as onLapCompleted but also sends the current lap as parameter.

OnRaceEnd IRDSCarControllerAI.onRaceEnd

The on race end callback. This callback is called once when this car instance ends the race.

OnRaceStart IRDSCarControllerAI.onRaceStart

The on race start callback. This callback is called once for each car instance.

OnRespawn IRDSCarControllerAI.onRespawn

The on respawn callback. This callback is called once when this car instance is respawned.

OnUnstuck IRDSCarControllerAI.onUnstuck

The on unstuck callback. This callback is called once when the AI is getting unstuck.

OnUnStucked IRDSCarControllerAI.onUnStucked

The on Unstucked callback. This callback is called once when the AI is Unstucked.

bool IRDSCarControllerAI.originalAutoBrake = false

The original auto brake.

bool IRDSCarControllerAI.overrideNitroInput = false

The override nitro input.

bool IRDSCarControllerAI.pitsAutopilot = true

The pits autopilot.

float IRDSCarControllerAI.pitsTime = 15

The pits time.

int IRDSCarControllerAI.player1IndexDAC = -1

The player1 index DA.

int IRDSCarControllerAI.playerNumber = -1

The player number.

int IRDSCarControllerAI.racePosition = 0

The race position.

float IRDSCarControllerAI.raceStartTime

The race start time.

float IRDSCarControllerAI.resetTime = 1.0f

The reset time.

float IRDSCarControllerAI.resetTimer = 0.0f

The reset timer.

bool IRDSCarControllerAI.respawn = true

The respawn.

bool IRDSCarControllerAI.respawnAtWP = true

The respawn at W.

float IRDSCarControllerAI.respawnHeight = 0.5f

The height of the respawn.

float IRDSCarControllerAI.respawnOutOfLimitMaxDistance = 0f

The respawn out of limit max distance. If this is set to 0 it would be disabled, other wise the cars would be respawned if they get their distance from the racing line higher than this distance.

float IRDSCarControllerAI.respawnSpeed = 15

The respawn speed.

bool IRDSCarControllerAI.rollingStart = true

Rolling start. This is for internal use only!, this is set by the System if rolling start have been selected as the race start type.

float IRDSCarControllerAI.shiftUpFactor = 0.95f

The shift up factor.

float IRDSCarControllerAI.spdLimit = 0

The spd limit.

float IRDSCarControllerAI.speedOverride = 0f

The speed override. Set this variable to the desired speed(m/s) you want the AI to run at. The speed is in meters per seconds.

float IRDSCarControllerAI.speedTrapPoints = 0f

The speed trap points.

IRDSStatistics IRDSCarControllerAI.stats

The stats.

SubTrackChooseModes IRDSCarControllerAI.subTrackChoosedMode = SubTrackChooseModes.Fastest

The sub track choosed mode.

float IRDSCarControllerAI.targetDistanceFromPlayer = 15f

The target distance from player.

float IRDSCarControllerAI.targetDistanceFromPlayerThreshold = 25f

The target distance from player threshold.

bool IRDSCarControllerAI.threeWideStyle = false

The three wide style.

float IRDSCarControllerAI.tireBrakeForce = 0

The tire brake force.

bool IRDSCarControllerAI.tireSlipRatio = false

The tire slip ratio.

bool IRDSCarControllerAI.wasJumping = false

The was jumping.

bool IRDSCarControllerAI.wrongWay = false

The wrong way.

bool IRDSCarControllerAI.yellowFlag = false

The yellow flag.

Property Documentation

bool IRDSCarControllerAI.IsPlayer
getset

Gets or sets a value indicating whether this instance is player.

true if this instance is player; otherwise, false.