...
A Bar Linkage Solver controlling a piston pushing an arm.
...
Where to find
The Bar Linkage Solver component can be found under Mechanics > Add Kinematics > Bar Linkage Solver.
...
It can also be accessed from the GameObject menu as well as or from the Hierarchy Context menu.
...
Generic Joint Settings | |||
Pass Priority | Priority of the kinematic chain calculations. Higher numbers are calculated earlier. | ||
Enforce Outside Playmode | Enforces the prismatic joint in edit mode. | ||
Prevent Kinematic Update | Removes the prismatic joint from the kinematic chain calculations. | ||
Prevent Further Kinematic Update on this GameObject | Allows lower priority kinematic transforms on the same GameObject to be skipped in calculations. | ||
Allow Direct User Input | Allows the user to manipulate the prismatic joint with the scene gizmo. | ||
Min. User Input Translation Offset | The minimum value the user must input before translations are applied. | ||
Min. User Input Rotation Offset | The minimum value the user must input before rotations are applied. | ||
Kinematic Chaining | |||
Opposing Relation Instance | The kinematic transform to which you want to link the prismatic joint to. | ||
Relation Direction | Describes the direction of the manipulation of the Transforms. The following options are available:
| ||
Relation Type |
| ||
Motion Direction is Reversed | When enabled, the manipulation to/from the opposing kinematic transform is inverted. | ||
Bar Linkage Triangles | |||
Add Triangle | Allows the user to add a new triangle with a random color to the Bar Linkage Solver. | ||
Triangle ## | Shows the ID of the triangle, the names of the two Wheel Joints in the triangle and whether the triangle is de the leading triangle. | ||
Color Picker | Allows the user to change the color of the triangle. | ||
Delete Button | Allows the user to delete the triangle from the Bar Linkage Solver. | ||
Leading Triangle / Set as Leading | If the triangle is the leading triangle, that will be displayed. Otherwise Else a Button button will show appear to set the triangle as the leading triangle. | ||
Moving Pivot | The Bar Linkage Solver is the Moving Pivot by default. This is a constant field and is shown for clarity. | ||
Fix Pivot | Allows the user to assign a Wheel Joint as Fix Pivot. | ||
Hinge Point | Allows the user to assign a Wheel Joint as Hinge Point. | ||
Draw Triangle Gizmo | Allows the user to toggle the triangle gizmos.gizmo | ||
Limit Relation & Update Settings | |||
Spline Input field | Defines the spline to which the Prismatic Joint is bound to. | ||
Prismatic Joint Settings | |||
Spline Constraint Lenght | The lenght length of the spline | ||
Current Spline Position | Normalized position of the Prismatic joint over the spline between 0 and 1. | ||
Target Control Point | The Spline point to be used for Update Limit ControlPoint. | ||
Update Limit ControlPoint | Updates the Target Control Point to the current spline position. |
How to use - Part A
To create a Bar Linkage Solver, you first need the right setup. This setup will include several fixed arms, Wheel Joints and a Piston (this requires a Spline ). Part A of the How to use will guide you through the process of creating this system.
Example of a system suitable for a Bar Linkage Solver.
First, add Add a Wheel Joint to each of the rotational points.
Make sure the Wheel Axis Direction of the Wheel Joints are aligned with the desired rotation.
After all Wheel Joints are added, create a Spline to control the range and postion of the Piston. Align the Spline Control Points to the Piston Rod. Holding V enables snapping to vertices in Unity.
Make sure the Spline is parented under the Piston. Your system is now set up to add a Bar Linkage Solver
...
Add a Kinematics Controller,this can be found under Mechanics > Add Kinematics > Kinematics Controller.
Make sure the Kinematic Controller is placed above the system in the Hierarchy.
Add a Bar Linkage Solver to the prismatic component in the system. This can be found under Mechanics > Add Kinematics > Bar Linkage Solver. The prismatic component is the piston part that controls the system.
Assign the Spline as the constraining spline for the Bar Linkage Solver.
Create a Triangle.
Assign the Fix Pivot and the Hinge Point for the Triangle.
Turn on Enforce outside playmode, the first Triangle should work now.
Create the a second Triangle in a similar fashion. and follow the same steps
The Bar Linkage Solver is now complete.