Last weekend, I tried to map a stick to movement for an off-center object and it was more complicated than expected: I had a point in the world and I wanted world-space vectors corresponding to screen-space directions while compensating for the camera’s projection. (So that if I were to draw a ray along them it would form a perfect screen-space “+”, even off-center). I got it working with a game jam level of efficiency, but now I’m wondering… what is the right way to do this?
@reedbeta yeah, of course. In my initial haste, I neglected the critical bit of translating "up" into camera "forward", which is no longer aligned to with "up" due to the projection... so up means running into the screen along an apparent vertical line (as it would for an object at screen center)
Mastodon server focused on game development and related topics.