Description

VG_Articulation is an internal script that provides the main interface to mark an object as interactable (see object identifiers), as well as to parametrize its object articulation and interactive behavior.

By default, the VG_articulation component sets an object to have floating joint type.

VG Articulation
The default VG_Articulation Component (floating joint type).

As soon as you change the joint type, the interface will change dynamically.

VG Articulation
VG_Articulation interface after changing to prismatic joint type.

All the parameters are explained in detail in object articulation.

When you want to enable this script, you have to add it on the same GameObject that you want your script to work for.

Runtime Changes

Regardless of what is the initial setting of an object’s articulation, you can change the object’s articulation parameters in runtime through scripting using the API functions ChangeObjectJoint and RecoverObjectJoint.

ChangeObjectJoint

One of the two ChangeObjectJoint API functions receives an VG_Articulation component as input for the object articulation settings you want to apply.

To do that, you can add a disabled VG_Articulation component to the object, which your script can receive and use as the argument in the ChangeObjectJoint function.

As a result, all the parameters set in the component will be specified in runtime on the object.

RecoverObjectJoint

If you want to recover the object joint to its original parameters set by the enabled VG_Articulation component, you can call the RecoverObjectJoint API function.