filbs111 / 3sphere-explorer

visualising a 3-sphere from the inside in webgl
5 stars 0 forks source link

smooth position movement (camera and bullets) #16

Closed filbs111 closed 6 years ago

filbs111 commented 7 years ago

currently camera moving by steps on key events, resulting in movement like text input - hold down, steps once, pauses, then steps repeatedly. would like more "gamelike" camera motion, with a sense of momentum. momentum should be conserved in world frame, not player frame. ie if camera accelerates forwards, then turns 90 deg to the left, they should have momentum to its right. should work independently of framerate. moving by deltaT as a stopgap measure a waste of time. should decouple rendering from mechanics update. interpolation (of rendering between mechanics updates) outside scope. only require position (ie camera moving up/down, left/right, forward/back. camera rotation outside scope. bullets should use this system (ie speed should be independent of framerate)

filbs111 commented 6 years ago

f9a4a00f329e8fb7ba78414636c9c5e3083e6c95 continuous movement.

filbs111 commented 6 years ago

abab4ed4aeba7ef83b4365b1269188017706f8c0 velocity is smoothed, and distance moved is nonlinear with duration of keypress for linear (ie not rotational) movement. velocity currently stored in frame of spaceship and velocity is heavily damped. good for test camera. todo more "gamey" movement for spaceship. put ui sliders to change behaviour. consider "on rails" behaviour, where velocity in frame of spaceship is conserved so spaceship turns corners etc. having "space tank" that behaves like a tracked vehicle in space might work!

filbs111 commented 6 years ago

stuff in description is complete