Mechanical visual rigs
The vehicle prefabs show moving suspension and steering parts. The core package includes the rigged Sedan. Demo Content adds the other _Rig vehicles. The rigs use the RCCP drivetrain, RCCP_WheelCollider settings, wheel models and brakes.
Use a rig vehicle
- Open the
Demo Content/Prefabs/Vehicles/Mechanical Rigsfolder. - Drag a
_Rigprefab into your scene. - Register the vehicle and configure its input as for other RCCP vehicles.
- Start Play Mode.
- If the rig vehicle is the player vehicle, select Rig view on the HUD or press X. The body hides or shows. The wheels and the rig parts stay visible.
- If a mechanism does not move, look in the Console for an error that starts with
Mechanical visual rig:.
Scripts can read RCCP_MechanicalVisualRig.PoseValid. The value is true when the last update completed.
Keep the referenced meshes when you move a rig prefab. The core Sedan rig meshes are in Models/Sedan01/MechanicalRig/. The shared mechanical rig scripts are in Scripts/Vehicle/MechanicalVisuals/. Other vehicle rig meshes remain in Demo Content.
When Demo Content is installed, the demo spawn menu uses the rig prefabs from RCCP_DemoVehicles. The menu labels do not show the _Rig suffix. Demo Content does not include the old non-rig vehicle prefabs. Without Demo Content, the core Prototype scene uses the rigged Sedan.
How movement works
In LateUpdate, RCCP_MechanicalVisualRig reads the current RCCP wheel model and its steering and alignment pose. The component moves the separate uprights and fits each visual link between its attachment markers. The component also updates the dedicated spring or anti-roll deformation channels. The Formula rig also uses visual rockers. The RCCP components still control wheel rotation and caliper alignment.
Each vehicle has its own suspension layout. The component changes only its added MechanicalVisuals hierarchy. The component does not add colliders, change wheel travel, apply torque or constrain the physical wheels.
NOTE:
RCCP_SportPickup01_RigusesRCCP_OpenChassisRigandRCCP_RearLeafVisualinstead ofRCCP_MechanicalVisualRig. These scripts are inDemo Content/Scripts/Vehicles/OpenChassis01andDemo Content/Scripts/Vehicles/SportPickup01.
Adjust attachments
Select the rig prefab and examine its RCCP_MechanicalVisualRig component. Wheels binds the existing wheels to separate uprights. Links binds each visual part to its start and end markers. Leaves binds the dedicated deformation channels. Levers contains the optional rockers.
To adjust a connection, edit the added markers. In the neutral pose, keep the pivot of each part at its start marker. Point the local axis of the part at its end marker. Keep all scales positive. After you change a marker, test the full steering and suspension travel again. The component records the neutral pose when it starts.
Keep the fixed supports under the native frame, so that they follow the body tilt. Keep the suspension geometry outside the rotating wheel models. Do not assign native wheel, caliper, collider or drivetrain transforms as driven parts.
Limits
The rigs show mechanical movement from the current RCCP physics outputs. Link lengths can change to keep the connections visible. Some pistons change the length of their hidden section. If the source model has no steering linkage, the added steering links are visual approximations. The rigs are not a physical joint solver. The rigs do not show the suspension geometry of the real manufacturer.
The separated parts keep the source materials and mechanical deformation channels. If you replace the wheels or meshes with a different layout, check the bindings and clearances again.