realmayus/engine-wgpu

Better Cam

Opened this issue · 3 comments

Implement a camera which supports movement like the on in blender:

  • Middle mousebutton (or any mousebutton $n$) to rotate aroung target, initially origin
  • Shift + mousebutton $n$ to pan
    • pan shifts the target point on the plane which is defined by the view vector and the current target point
    • Shifts it in the opposite direction of the mouse movement
  • Scrollwheel to zoom (eye of current camera i think)

While we're at it, we should also include a first person shooter-kind of camera which allows you move around with WASD and pan by moving your mouse

Part one has been partially implemented.

  • Can't yet rotate over object (camera refuses to be upside down)
  • Pan has issues when looking almost straight down/up (the reason is known though), i.e. translation is inverted in one or both directions and/or slower in one direction
  • The movement speed feels weird

Update on part one:

Can't yet rotate over object

This will be a feature now.

Pan has issues when looking almost straight down/up (the reason is known though)

The reason is, in fact, not known. Will have to look into that again, but making #1 ready for merging is prio now.

The movement speed feels weird

This is actually solved, but the panning issues are annoying.