CoreScript mouse panning code hardcodes screen resolution/aspect ratio

Used like this:

Why are either of these based on screen aspect ratio?

1 Like

I just read this script a couple days ago in PlayerScripts.CameraScript.RootCamera from Play Solo. I thought it was strange that there were hardcoded values there. I think MouseTranslationToAngle and ScreenTranslationToAngle should just be the same function.

also, how are these angles?

Looks fine to me. Camera panning speed should be consistent across different monitor aspect ratios.

ConvexHero, always asking the bigger questions. :happy1:

I’ve noticed that the camera control script defines a TOUCH_SENSITIVITY vec2 that is more sensitive in X than in Y (clearly by design), which is probably why its hard to tell that the angle ultimately calculated from the thetas returned from this function are (sometimes) wrong.