SlicerVirtualReality
SlicerVirtualReality copied to clipboard
Add button state as attributes of controller MRML transforms
This would allow modules to define custom behaviors and controller actions, which would significantly enhance the utility of SlicerVR (for example allowing scripted code to do basically everything a loadable module can do).
Child of #27
Shouldn't we expose these as events instead? Events can have attributes (e.g., joystick/touchpad position), so we would need to update multiple attributes in sync. It would be also risky that we would miss some interactions, such as when the user clicks button repeatedly multiple times.
Exposing the state would be a good place to start, and then events can be generated when state changes. I think it would be good to expose the event history as state (list of timestamped events) so that modules can react to complex events without storing the state themselves. We should look at some concrete use cases.
Is there currently any way to custumize controller button actions?