Using a raycast to create a first person shooting mechanic in Unity.

//left click to fire, cast a ray to the center of the screen.
//debug the name of the object you hit.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store