Class RouteGeometryBender
Bends the given renderer and collision mesh along the route spline, after it got spawned by a RouteIntervalSpawner.
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Runtime.dll
Syntax
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(MeshFilter))]
[AddComponentMenu("holoride/Route Geometry Bender")]
[HelpURL("http://localhost:8080/api/Holoride.ElasticSDK.RouteGeometryBender.html")]
public class RouteGeometryBender : MonoBehaviour
Fields
BendingResolution
The sampling resolution along the spline to bend the meshes with.
Declaration
[Tooltip("The sampling resolution along the spline to bend the meshes with.")]
public int BendingResolution
Field Value
Type | Description |
---|---|
int |
MeshCollider
The mesh collider containing the collision mesh to bend.
Declaration
[Tooltip("The mesh collider containing the collision mesh to bend.")]
public MeshCollider MeshCollider
Field Value
Type | Description |
---|---|
MeshCollider |
MeshFilter
The mesh filter containing the render mesh to bend.
Declaration
[Tooltip("The mesh filter containing the render mesh to bend.")]
public MeshFilter MeshFilter
Field Value
Type | Description |
---|---|
MeshFilter |
MeshRenderer
The mesh renderer.
Declaration
[Tooltip("The mesh renderer.")]
public MeshRenderer MeshRenderer
Field Value
Type | Description |
---|---|
MeshRenderer |
OnBendingFinished
The event that is called when the bending has finished.
Declaration
public UnityEvent OnBendingFinished
Field Value
Type | Description |
---|---|
UnityEvent |
Methods
Awake()
Implements the Start method of the MonoBehaviour life-cycle.
Declaration
public void Awake()
BendGameObject(Spline, double)
Bends the render mesh and the collision mesh with the spline curvature.
Declaration
public void BendGameObject(Spline spline, double placingDistance)
Parameters
Type | Name | Description |
---|---|---|
Spline | spline | The spline to bend along. |
double | placingDistance | The placing distance. |
BendGameObject(List<Matrix4x4>, List<Matrix4x4>)
Declaration
public void BendGameObject(List<Matrix4x4> bendingMatrices, List<Matrix4x4> innerMatrices)
Parameters
Type | Name | Description |
---|---|---|
List<Matrix4x4> | bendingMatrices | |
List<Matrix4x4> | innerMatrices |
BendGameObject(List<Matrix4x4>)
Declaration
public void BendGameObject(List<Matrix4x4> bendingMatrices)
Parameters
Type | Name | Description |
---|---|---|
List<Matrix4x4> | bendingMatrices |