Method CalculateSurroundingPositions
CalculateSurroundingPositions(Transform, Bounds, Single, Int32)
Determines the world positions around an object.
Declaration
public static RideVector3[] CalculateSurroundingPositions(Transform coverObj, Bounds coverObjExtents, float extentsPadding = 1F, int fidelity = 4)
Parameters
Type | Name | Description |
---|---|---|
Transform | coverObj | The object to surround |
Bounds | coverObjExtents | The boudning volume extents of the object to surround |
System.Single | extentsPadding | The additional space to add to the extent length so that you aren't on the edge of the cover object |
System.Int32 | fidelity | The number of surrounding points in a circle around the object to surround |
Returns
Type | Description |
---|---|
RideVector3[] | The world positions surrounding the coverObj. This array's length is equal to fidelity |
CalculateSurroundingPositions(ISpatialObject, Single, Int32)
Determines the world positions around an object.
Declaration
public static RideVector3[] CalculateSurroundingPositions(ISpatialObject spatialObject, float extentsPadding = 1F, int fidelity = 4)
Parameters
Type | Name | Description |
---|---|---|
ISpatialObject | spatialObject | The object to surround |
System.Single | extentsPadding | The additional space to add to the extent length so that you aren't on the edge of the cover object |
System.Int32 | fidelity |
|
Returns
Type | Description |
---|---|
RideVector3[] | The world positions surrounding the coverObj. This array's length is equal to fidelity |
CalculateSurroundingPositions(RideVector3, RideQuaternion, RideVector3, Single, Int32)
Determines the world positions around an object.
Declaration
public static RideVector3[] CalculateSurroundingPositions(RideVector3 center, RideQuaternion orientation, RideVector3 extentsFromCenter, float extentsPadding = 1F, int fidelity = 4)
Parameters
Type | Name | Description |
---|---|---|
RideVector3 | center | World position of the object to surround |
RideQuaternion | orientation | World rotation of the object to surround |
RideVector3 | extentsFromCenter | Bounding volume extents of the object to surround |
System.Single | extentsPadding | The additional space to add to the extent length so that you aren't on the edge of the cover object |
System.Int32 | fidelity | The number of surrounding points in a circle around the object to surround |
Returns
Type | Description |
---|---|
RideVector3[] | The world positions surrounding the coverObj. This array's length is equal to fidelity |