I’m trying to to make a cube behave like a toggle button so that when I touch it it shouldn’t change it’s position on x-axis and z-axis only on y-axis. Also the augmented hand shouldn’t go inside that object.
This is because Microsoft owns and maintains their AR Foundation provider plug-in and build tools. (As opposed to a handful of other providers plug-ins that are maintained by Unity).
That said, I think what goonslayer44 is suggesting is a good general idea for how to make a cube behave like a toggle button.