I have been trying to get a gameobject to jump to where my mouse cursor is.
What had worked is to have a ground plane, and use Camera.WorldToScreenRay. However, I am curious if it is possible to have the same effects using Camera.ScreenToWorldPoint.
I also the issue is that I have no idea what to set for the z component of the input vector to the function.
In my case, the floor plane will always be at y = 0. So setting the z component of the vector to the negative of the camera's y works.
– Extrakun