microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Custom easing options between states in visual themes #6009

Closed ritijain closed 9 months ago

ritijain commented 5 years ago

Describe the problem

Visual Themes on Interactables provide an option for easing which is great. But there is no provision for setting up the easing option per state transition -

Example:

image

In the above example, if I want to ease the scaling between Default -> Focus states driven by a linear animation curve over a period of 1 sec, but when going from Focus->Default i do not want to apply easing or want to apply easing only over 0.5 sec duration. This is currently not supported in the Visual Themes system.

Describe the solution you'd like

Easing can be configured per valid state transitions. (Not sure if Visual Themes have a concept of "valid transition" since it is designed more as a state -> theme lookup)

ritijain commented 5 years ago

@Troy-Ferrell thoughts?

Troy-Ferrell commented 5 years ago

Very interesting! This would be a bit difficult to define the data and an inspector for because it's basically a graph. Like every relationship between states would/could need an easing value

It would be easier to define a global easing and then one off easing values for specific state transitions.

There is a custom properties field that maybe a developer could utilize to define their own custom easing transitions which is handled by their theme engine class. It would still be very difficult and the inspector couldn't show it very well

Themes are more dumb to just index accessor types. They are not aware of what state transitions are valid or how that occurs. That is also contained within the States class/object. And States is in strong need of a refactor first.

david-c-kline commented 3 years ago

@CDiaz-MS, can you look into this for v3? How might this look with interactive element, etc.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!