EasyRoads3D V3 Manual
 

 

ERConnection


Description

This is the base class for an EasyRoads3D connection/crossing between roads.

 

Constructors

...

 

Functions

 

public bool Destroy()

Removes the connection object

 

public int FindNearestConnectionIndex(Vector3 position)

Returns the nearest connection index to the past Vector3 position

 

public ERConnectionData[] GetConnectionData()

Returns the currently available connection data of the connection object

 

public Vector3 GetLocalConnectionPosition(int connectionIndex)

Returns the local position of connectionIndex

 

public Vector3[] GetLocalConnectionPositions()

Returns the local positions of all the connections of this connection prefab

 

public string GetName()

Returns the name of the connection object

 

public Vector3 GetConnectionWorldPosition(int connectionIndex)

Returns the world position of connectionIndex

 

public Vector3[] GetConnectionWorldPositions()

Returns the world positions of all the connections of this connection prefab

 

public void RotateConnections(Vector3 position)

Rotates the crossing and reconnects the attached roads to the new connections. Returns false if the operation could not be completed because of different connection types and the currently attached roads

 

public void SetPosition(Vector3 position)

Updates the position of the connection object

 

public void SetName(string name)

Updates the name of the connection object

 

public void SetRotation(Vector3 euler)

Updates the eulerAngles rotation of the connection object

 

public void SwapTurn()

Swaps the turn between the left and right side of the main road, returns false if the operation could not be completed due to a road already being attached

 

public void UnConnect(int connectionIndex)

Removes the connection with the road object at connectionIndex.