Question by
tkaczu · Jul 27, 2018 at 09:35 AM ·
camerascreentoworldpoint
Changing camera angle and screentoworld
Hello there. I have a problem. I was coding with top-down orthographic camera and the ScreenToWorldPoint(inpu.mousePosition) worked perfectly well. Now I.m trying to change my camera x angle from 90(top-down) to 65 degrees. And ScreenToWorldpoint stoped working. I knew there will be a problem with it, but i have no idea how to easy repear this.
Any ideas? :) Thanks.
Comment
Answer by tkaczu · Jul 27, 2018 at 10:11 AM
I managed with this problem. All i did was this: Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x,Input.mousePosition.y,33)); Where 33 is the distance between camera and plane.