I want to click on a 3D plane with my mouse. When I do this, I want it to return a Vector3
of where I clicked. When I use:
Vector3 point = Camera.main.ScreenToWorldPoint(Input.mousePosition);
then, it gives me the Vector3 of the center of the plane. Not what I want. I want it to be at the position I click.
I am trying to create a Ray
(Camera.ScreenPointToRay
) and work with Physics.Raycast
, but that just returns a bool
, and not where it actually hits.
I have spent the last 3 hours reading everyone else’s questions…what am I missing here?