Chain component creates continuous loop transport systems with elements following spline-defined paths in industrial automation. More...

Public Member Functions | |
void | Modify () |
Vector3 | GetPosition (float normalizedposition) |
Vector3 | GetTangent (float normalizedposition) |
Vector3 | GetUpDirection (float normalizedposition) |
![]() | |
void | PreStartSim () |
Is called by the realvirtualController before the component is started. | |
void | StartSim () |
Is called by the realvirtualController to start or stop the component. | |
void | StopSim () |
Vector3 | DirectionToVector (DIRECTION direction) |
Transfers the direction enumeration to a vector. | |
DIRECTION | VectorToDirection (bool torotatoin, Vector3 vector) |
Transfers a vector to the direction enumeration. | |
float | GetLocalScale (Transform thetransform, DIRECTION direction) |
List< BehaviorInterfaceConnection > | UpdateConnectionInfo () |
List< Signal > | GetConnectedSignals () |
void | SetVisibility (bool visibility) |
Sets the visibility of this object including all subobjects. | |
List< BehaviorInterfaceConnection > | GetConnections () |
List< Signal > | GetSignals () |
GameObject | GetChildByName (string name) |
Gets a child by name. | |
List< GameObject > | GetChildsByName (string name) |
Gets all child by name. | |
GameObject | GetChildByNameAlsoHidden (string name) |
List< GameObject > | GetAllMeshesWithGroup (string group) |
List< GameObject > | GetAllWithGroup (string group) |
List< GameObject > | GetAllWithGroups (List< string > groups) |
List< GameObject > | GetAllMeshesWithGroups (List< string > groups) |
List< string > | GetMyGroups () |
List< GameObject > | GetMeshesWithSameGroups () |
List< GameObject > | GetAllWithSameGroups () |
MeshRenderer | GetMeshRenderer () |
Gets the mesh renderers in the childrens. | |
void | SetCollider (bool enabled) |
sets the collider in all child objects | |
void | ErrorMessage (string message) |
Displays an error message. | |
void | ChangeConnectionMode (bool isconnected) |
void | Log (string message) |
Logs a message. | |
void | Log (string message, object obj) |
Logs a message with a relation to an object. | |
void | Warning (string message, object obj) |
Logs a warinng with a relation to an object. | |
void | Error (string message, object obj) |
Logs an error with a relation to an object. | |
void | Error (string message) |
Logs an error. | |
GameObject | DebugPosition (string debugname, Vector3 position, Quaternion quaternation, float scale) |
Displays a gizmo for debugging positions. | |
void | SetFreezePosition (bool enabled) |
Freezes all child components to the current poosition. | |
void | SetRbConstraints (RigidbodyConstraints constraints) |
virtual void | AwakeAlsoDeactivated () |
Public Attributes | |
ChainOrientation | chainOrientation |
Orientation of the chain (Horizontal or Vertical) | |
GameObject | ChainElement |
Chainelements which needs to be created along the chain. | |
string | NameChainElement |
Name for the chain elements. | |
Drive | ConnectedDrive |
The drive which is moving this chain. | |
int | NumberOfElements |
The number of elements which needs to be created along the chain. | |
float | StartPosition |
The start position in millimeters on the chain (offset) for the first element. | |
bool | CreateElementeInEditMode |
Create chain elements in edit mode. | |
bool | CalculatedDeltaPosition |
True if the distance (DeltaPosition) between the chain elements should be calculated based on number and chain length. | |
float | DeltaPosition |
Distance in millimeters between chain elements. | |
bool | ScaledOnFixedLength |
Scale chain to fixed length. | |
float | FixedLength |
Fixed chain length in millimeters. | |
float | Length |
The calculated length of the spline in millimeters. | |
Spline | spline |
bool | unitySplineActive |
bool | usepath |
![]() | |
string | Name |
The name of the component if it should be different from the GameObject name. | |
ActiveOnly | Active |
GameObject | FromTemplate |
realvirtualController | realvirtualController |
bool | HideNonG44Components |
bool | SceneIsAdditive |
bool | ForceStop |
Protected Member Functions | |
override void | AfterAwake () |
![]() | |
bool | hidename () |
bool | hideactiveonly () |
virtual void | OnStopSim () |
virtual void | OnPreStartSim () |
virtual void | OnStartSim () |
MU | GetTopOfMu (GameObject obj) |
Gets the top of an MU component (the first MU script going up in the hierarchy) | |
void | InitGame4Automation () |
Initialiates the components and gets the reference to the realvirtualController in the scene. | |
void | Awake () |
Additional Inherited Members | |
![]() | |
enum | ActiveOnly { Always , Connected , Disconnected , Never , DontChange } |
![]() | |
static bool | DirectionIsLinear (DIRECTION direction) |
Gets back if the direction is linear or a rotation. | |
Detailed Description
Chain component creates continuous loop transport systems with elements following spline-defined paths in industrial automation.
The Chain component is designed for simulating chain-driven transport systems where individual elements (links, buckets, carriers, or fixtures) move along a continuous path. It automatically generates and positions chain elements along spline curves, providing realistic visualization and physics simulation of chain conveyors, bucket elevators, overhead conveyors, and similar transport mechanisms.
Key features:
- Automatic generation of chain elements along spline paths
- Support for both Pixelplacement Splines and Unity Splines (Unity 2022.1+)
- Configurable element spacing with automatic or manual distribution
- Horizontal and vertical chain orientations for different applications
- Edit-mode preview for design-time visualization
- Integration with Drive components for speed control
- Scalable chain length with automatic element adjustment
- Support for complex 3D paths including curves and elevation changes
Common applications in industrial automation:
- Chain conveyors for heavy-duty material transport
- Bucket elevators for vertical material handling
- Overhead power and free conveyors in assembly lines
- Carousel systems for buffering and accumulation
- Pallet transport systems with carriers
- Drag chain conveyors for bulk material
- Accumulating chain conveyors with individual carriers
- Festoon systems for cable management
The Chain component works by:
- Analyzing the spline path to calculate total length
- Generating specified number of elements at calculated intervals
- Positioning each element along the spline based on normalized position
- Updating element positions based on drive speed during simulation
- Maintaining proper orientation along the path tangent
Chain element types and configurations:
- Simple chain links for basic visualization
- Buckets for bucket elevator simulation
- Carriers with fixtures for workpiece transport
- Pallets for automated storage systems
- Custom prefabs for specialized applications
Integration with other components:
- Requires IChain interface implementation (ChainBelt or ChainPath)
- Connects to Drive component for movement control
- Chain elements implement IChainElement for position updates
- Works with sensors for element detection
- Compatible with MU components for load handling
- Can trigger events based on element positions
Path definition options:
- Pixelplacement Spline for intuitive path editing
- Unity Splines for advanced curve control
- Support for closed loops and open-ended paths
- Multiple spline segments for complex routing
- Tangent and normal control for element orientation
Performance considerations:
- Element count affects performance - optimize for visible detail
- Use simplified meshes for chain elements when possible
- Consider LOD systems for large chain installations
- Batch element updates for better performance
- Use appropriate update rates based on chain speed
The Chain component provides essential functionality for industries requiring continuous material flow along defined paths, offering both visual accuracy and functional simulation capabilities.
For detailed documentation and examples, see: https://doc.realvirtual.io/components-and-scripts/motion/chain
Member Function Documentation
◆ AfterAwake()
|
protectedvirtual |
Reimplemented from realvirtual.realvirtualBehavior.
Member Data Documentation
◆ CalculatedDeltaPosition
bool realvirtual.Chain.CalculatedDeltaPosition |
True if the distance (DeltaPosition) between the chain elements should be calculated based on number and chain length.
◆ ChainElement
GameObject realvirtual.Chain.ChainElement |
Chainelements which needs to be created along the chain.
◆ chainOrientation
ChainOrientation realvirtual.Chain.chainOrientation |
Orientation of the chain (Horizontal or Vertical)
◆ ConnectedDrive
Drive realvirtual.Chain.ConnectedDrive |
The drive which is moving this chain.
◆ CreateElementeInEditMode
bool realvirtual.Chain.CreateElementeInEditMode |
Create chain elements in edit mode.
◆ DeltaPosition
float realvirtual.Chain.DeltaPosition |
Distance in millimeters between chain elements.
◆ FixedLength
float realvirtual.Chain.FixedLength |
Fixed chain length in millimeters.
◆ Length
float realvirtual.Chain.Length |
The calculated length of the spline in millimeters.
◆ NameChainElement
string realvirtual.Chain.NameChainElement |
Name for the chain elements.
◆ NumberOfElements
int realvirtual.Chain.NumberOfElements |
The number of elements which needs to be created along the chain.
◆ ScaledOnFixedLength
bool realvirtual.Chain.ScaledOnFixedLength |
Scale chain to fixed length.
◆ StartPosition
float realvirtual.Chain.StartPosition |
The start position in millimeters on the chain (offset) for the first element.