Namespace Interaction
Classes
AudioController
The AudioController is a behaviour automatically attached to a TrainAR Object on conversion. It triggers its sounds for selection, deselection, grabbing, releasing and correct/incorrect interactions/combinations specific to this object.
When attached, it holds default sounds. Those can be replaced in the Unity Editor Inspector.
CollisionController
Detects and handles collisions of TrainAR Objects. This is e.g. used for combining GameObjects and visualizing interseted states through outlining and shading.
CrosshairController
The CrosshairController activates/deactivates the crosshair which is positioned in the middle of the screen. This can e.g. happen when an object is grabbed or an overlay is active.
InteractionController
Handles the interactions, i.e. grabbing, releasing, interacting and combining of the TrainARObjects.
MaterialController
Handles material related functionality for TrainAR objects.
ObjectLerpingController
When TrainAR objects are grabbed, they lerp towards to correct position attached to the camera instead of appearing there. The ObjectLerpingController handles the lerping towards the camera when the object is grabbed.
Outline
The Outline script is automatically attached to TrainAR objects on conversion and handles the outlining for e.g. selection, success or failure. It is called and handled by the MaterialController.
ResetLostObjectController
The ResetLostObjectController resets TrainAR objects back to the original spawn point when they are released too far away of the assembly. This is to prevent objects from falling through the infinityPlane or disapearing when release while the training assembly has tracking problems and "flaots" away.
RigidbodyController
The RigidbodyController is attached to TrainAR object on conversion. It handles the activation and deactivation of physics, as we do want TrainAR objects to elicit physics when released but not when stationary as this could e.g. cause users to "knock over" the assembly with grabbed objects.
TrainARObject
The main behaviour script for a TrainAR object. This is automatically added when converting GameObject to TrainAR objects After adding this script all following RequiredComponents are added. SelectionBase, MeshCollider, BoxCollider, RigidbodyController, MaterialController, AudioController, Rigidbody, Outline, CollisionController. The TrainAR events that are triggered on actions are also defined in this script.
TrainARObject.CustomUnityEvent
The CustomUnityEvent that is used for the OnCombination event. This Event also passes a string with its invocation indicating the other to be combined with TrainAR objects name.
Structs
CollisionController.Intersection
The struct that holds references of intersections.
Enums
Outline.Mode
Differentiates the type of the outlines used.