- Home /
Question by
up858871 · Feb 24, 2020 at 11:09 AM ·
c#guiraycastingpanelinteraction
How to make a Cube act as a button to increment a number on a screen overlay panel in an FPS?
All I want to do is get the buttons in my 3D environment to trigger an increment of 1 in the relative panels on the GUI. A wrong answer would make the mistake number increment by 1 etc. Theres little online on tackling this specific issue.
help.jpg
(224.7 kB)
Comment
Answer by logicandchaos · Feb 24, 2020 at 01:30 PM
You can attach a button component to a cube, it needs a collider as well and your camera needs a physics raycaster.
I have a button component currently that changes the colour of it, how would i reference the incremement of the number in my panel overlay?