How can I use the ScreenPointToRay to get my GameObject to be aligned to the floor (using only x and z)? Instead of using a distance variable to do this:
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
mousePos = ray.origin + (ray.direction * markerDistance);
playerTarget.transform.position = mousePos;
How can I have it instead of spinning around in a “spherical” pattern, how can I get the y axis to always be 0, but the object will still be in the correct location?