I have a problem with ScreenToWorldPoint because it just spews out
“NullReferenceException: Object reference not set to an instance of an object.”"
1st way i used it:
Vector3 objectPos = Camera.main.WorldToScreenPoint(transform.position);
2nd way i used it:
Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Can you please help me with this problem?
Thanks!