I am using this asset to generate a radial menu in the world space at the same position where the pointer of the Litho collides with another game object. It is pretty much like the spawning of the radial menu in this video by Litho.
My question is how do I use Litho to interact with such UI Canvas Elements in the world space? Are the elements that are being used in the video, game objects or 2D UI elements in the world space?
Hi Rajat,
- Litho is able to interact with any component that has a 3D Collider
component attached to it (e.g. MeshCollider
, SphereCollider
, BoxCollider
). Once it has a Collider
, simply attach a Manipulable
component (or perhaps Hidable
will be particularly useful in this case) to your world-space UI element, and it will trigger events when Litho enters, stays, grabs, holds, releases, and exits the object’s Collider
(much like a normal UI element, except in world-space). See the documentation here.
- You can use the ManipulatorUnityEventForwarder
component to access Manipulable
events in the Unity Inspector window
- You may have to modify your menu prefabs to give them a 3D mesh.
- It is highly recommended that you look at the example prefabs in the Showcase scene - these illustrate how such a menu can be implemented with Litho (e.g. MenuManipulablesBox.prefab).
Let us know how you get on