Some syntax nuances I don't really understand

float w = (1f / Screen.width) * Input.mousePosition.x;

Vector3 mousepos = new Vector3((1f / Screen.width) * Input.mousePosition.x, 1f / Screen.height * Input.mousePosition.y);

It’s written exactly the same. But float w is not the same as mousepos.x153259-help.png

Why tho? I thought vector3 is just a bowl of 3 floats. :confused:

Cheers!

Hi @Twinklier !

Vector3 automatically rounds up or down your floats, so you don’t have to deal with those tiny decimals. And Vector3 is a struct with 3 floats!

Edit: improvements to the answer suggested by Bunny83.