Closed filbs111 closed 7 years ago
added multitouch camera rotation control. idea for single digit rotation as stated before. multitouch should attempt to rotate such that all touch points cover a constant direction. eg a two finger twist about the centre of the screen should roll etc. currently a bit buggy: 1) if one digit is held static, another digit moving has no effect 2) seems not making shortest rotation, when set constperp large. guess still not quite right for small constperp. TODO understand why this is happening and write more test cases.
for linear motion: use residual touch movement after the "best estimate" rotation to move the player. for rectilinear projection view, this means pinch/anti-pinch gestures about a point to more towards or away from. for stereographic projection, can mean dragging left at "up" and "down" points on the screen etc.
works well enough to show people at the pub. moving towards an off-centre point doesn't work too great. will want to revisit before using this control scheme in a game. for parallel drags on "sideways circle" of wide angle view, being a bit off can be "solved" as a rotation almost through these points. could maybe do better by extending the best match gaussians thing over more variables. however, if want to do something with momentum, perhaps better to model touch points using friction etc, which expect is much less confusing to code.
closing since controls work ok, and datgui, framerate monitor seem fairly usable now disabled scaling via meta tag.
data gui and framerate monitor don't seem to work great on mobile. want to be able to use a given setting and measure the framerate at least, so can optimise. also want to be able to control camera - single finger drag for rotate (same as mouse click and drag). guess two finger gestures for other motions - two finger drag for move left/right/up/down, pinch for forward/back.