VG HighLighter
VG_HighLighter Component.

Description

VG_HighLighter is a public script. The MonoBehavior script exemplifies how you could enable object highlighting based on the current hand status; and provides a tutorial on the VG API functions for some of the VG_Controller event functions, such as OnObjectSelected and OnObjectDeselected.

When you want to enable this script, it is recommended to add it on the same GameObject where your MyVirtualGrasp script is.

You should not add this component to individual objects because this is a global setting that is not linked to specific objects.

Selection Highlighting

When the component is in the scene, selecting an object will highlight the selected object using the assigned Unity Shader.

When selecting the object with a left hand, the Left Hand Color will be used, and when selecting the object with a right hand, the Right Hand Color will be used.

Selection Highlighting when selecting objects with both hands.
If this video shows "This video is unavailable," please try to refresh the page.

Bake Highlighting

When playing the scene in the Unity Editor, you can also use the Highlighter to visualize the object baking state of the objects in your scene. Please read more on object baking if you are not familiar with the terminology.

There are three options you can enable by clicking on the respective buttons:

  • No Bakes: Highlight all objects that are not baked in red. You will only get Sticky Hand grasps on those objects.

  • Dynamic Grasps: Highlight all objects that are baked in green. You can use Dynamic Grasps on those objects.

  • Static Grasps: Highlight all objects that have static grasps assigned to them in cyan. These objects are usually baked and primary grasps were assigned to them using VG_GraspEditor. You can use Dynamic and Static Grasps on those objects.

Bake Highlighting in the Unity Editor. Note that most of the objects in the scene are baked, but not the small apple. Thus, grasping the big apple results in Dynamic Grasps, grasping the small apple results in Sticky Hand grasps.
If this video shows "This video is unavailable," please try to refresh the page.