get the position of mouse in world unity code example
Example: unity mouse position to world
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);