C# Touch Input with Raycast on Interactive Map to toggle Canvas
Hey folks,
I'm working on a 3D Interactive Map with Pins.
The device is a tablet (so touch input) and I'm using Raycast to hit the collision boxes of the pins and bring up 3D text above the pin. So far I have managed to do this but it takes 1 tap to turn on the 3D Text, then many more taps to turn off? Wat?
Despite the issues, I'd like change from 3D text to Canvas and I'm having trouble understanding the methods.
I Have:
C# Script with touch input/raycast
Pin objects with collision boxes (individual names)
Canvas with a hierarchy of text relevant to the pins
Question
How would I tell the raycast to hit a collision box then toggle on the UI. The function would also require the hit of a new pin to deactivate any previous Canvas pin info.
I have not attached my recasting script as I'm at work but I can later if requested.
Really appreciate any help.
Your answer
Follow this Question
Related Questions
Adding points for every gameObject on the scene instead of adding points for the destroyed one 0 Answers
Canvas Text show up but dont dissapear. 1 Answer
Problem in raycast to detect touch in 2D game 1 Answer
Detect direction of drag (Event Trigger) 0 Answers
How can I make a third person camera collision script? 2 Answers