2023.1.1344.2 Conveyor Belt
Overview
The Conveyor Belt allows you move objects over its surface where the velocity is determined by the rotation of a DWheel Joint.
It also has the ability to create a loft mesh to use as its surface but is is optional.
A rigid body is required for this component.
Where to find
The Conveyor Belt can be found under Standard Components > Conveyor Belt > Add Physical Component.
This will add the Conveyor Belt component to the currently selected object or create a new empty GameObject with the component attached if no objects are selected.
Feature Layout
Conveyor Belt Settings |
|
Wheel Joint | The Wheel Joint used as the driver for the Conveyor Belt. |
Velocity | The current velocity of the belt, which is driven by the rotation of the wheel joint. (This value is read only) |
Inverted Axis | When checked the rotation of the wheel will be done in the inverted direction for the belt. |
Local Direction | The local direction of the belt it is moving in. |
Loft Mesh Settings |
|
Circumference Spline | The (closed) Spline used to define the Loft Circumference. |
Surface Spline | The Spline used to define the Loft Surface. |
Set Optimal Orientation | When pressed guesses the optimal rotation values for the spline control points for the circumference and surface spline based on current shape. |
Circumference Max Length Deviation | The maximum distance between points on the Circumference Spline. |
Circumference Max Angle Deviation | The maximum angle between points on the Circumference Spline. |
Surface Max Angle Deviation | The maximum distance between points on the Surface Spline |
Invert Surface Normals | When checked generating the loft mesh will have triangle normal's on the opposite side. |
Show as Rendered Mesh | When checked generating the Loft Mesh will also create a Mesh Filter and a Mesh Renderer. |
(Re)Generate Surface | (Re)generates the “SurfaceGuideSplines“ describing the calculated surface according to the given circumference and surface splines. |
Clear Surface | Cleans up the “SurfaceGuideSplines“ when generated. |
Generate Loft Mesh | Generated a generate a Loft Mesh according to the “SurfaceGuideSplines“ generated with the “(Re)Generate Surface“ - Button. |
Gizmo Settings |
|
Enable Velocity Gizmo | When checked the Velocity Gizmo will be enabled. |
Show when not selected | When checked the Velocity Gizmo will be enabled when the component is not selected. |
Velocity Gizmo Color | The color of the Velocity Gizmo |
How to use
Generate a Loft Mesh (optional)
To generate a Loft Mesh, you first need to describe its surface. You do so by creating a Circumference and Surface Spline.
First create a Circumference Spline. This needs to be a closed spline around the edge of the belt.
Then, create a Surface Spline. This spline must be perpendicular to any point on the Circumference Spline.
If not sure if rotations over spline are correct press Set Optimal Orientation to get a good estimate.
When both splines are set up, click (Re)Generate Surface. Inspect the created “SurfaceGuideSpline“. If you are satisfied with the result click Generate Loft Mesh. This will generate the loft mesh and add it to a MeshCollider on the GameObject. Otherwise Tune the Circumference and Surface Splines and Regenerate the surface until you are satisfied. When you have obtain the wanted Loft Mesh, you can click Clear Surface to clean up the “SurfaceGuideSpline“. These are not needed anymore for the workings of the conveyor belt.
Assign a
WeelJoint
The conveyor belt requires a wheel joint to function. Rotating the wheel joint will result in a velocity change of the belt. This way you can have, for example, a motor component drive the conveyor belt.
Set the
Friction Type (optional)
Make sure that project settings have Friction Type set to “Patch Friction Type”. The provides the best result other friction type can work but have more issue’s.
Note: Friction Type can be found in the Project Settings:
Edit → Project Settings → Physics → Friction Type
Set local direction
The conveyor belt requires direction to move in to function and can only move in that direction.
Prespective Documentation