Set Motion Controller Model at runtime
Currently the motion controller models are assigned to a controller during the Awake method on the MotionControllerVisuallizer. Is there method to change the controller model during runtime?
Expected Behavior
Upon an application event/state change code could be implemented that would assign a new model/prefab to replace the existing controller model. Also be able to easily fallback to the default controller models.
I think the whole point of the MotionControllerVisualizer is to be the actual model with wiring inputs to it's animations. From what I digged through the code so far, there is no easy option to register a different model. You'll have to roll your own.
Is there method to change the controller model during runtime?
Currently, the best way to do this would be to create a single alternate controller prefab with multiple 'sub-states' and set MotionControllerVisualizer's AlternateLeftController / AlternateRightController to use that prefab.
MotionControllerVisualizer looks for transforms with specific names under the instantiated model, then uses those transforms to animate input events. You can see those transform names in the LoadInfo function.
If this alternate controller has a single set of transforms with those names, each 'sub-state' can use those transforms to drive their own animation.
@keveleigh what might be challenges to swap the controller models at runtime?
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.