Get Camera width

Hey Rick,
regarding what you are doing at ~7:42 could you also use ths code:
[SerializeField] Camera caMainCamera;
Debug.Log(Input.mousePosition.x / Screen.width * caMainCamera.orthographicSize * 2 * caMainCamera.aspect);

Then you wouldn´t have to remember to change it if you change camera size, or could this bring other problems later on i am not aware of? :slight_smile:

Hi Marv,

Welcome to our community! :slight_smile:

You are right. That would be easier. Thanks for sharing your solution!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms