Unity : Raycast (Part I)

RaycastHit hit;

In this variable we store information of object we hit.

Inside “other” and “collision” we store the information of object we collide (or trigger).

Ok, let’s back to Unity.
I continue to use new Input System, so at the top :
using UnityEngine.InputSystem

Now this is a Vector2 variable

--

--

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
Matteo Lo Piccolo

Matteo Lo Piccolo

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!