Javascript three.js smooth camera motion -
in javascript, can use document.addeventlistener('keydown', function(event){...});
add key listener. however, when using three.js
, moving camera key, camera moves once, delays, , continues moving. because computer delays key holding fixed amount of time. how go making camera move smoothly when key pressed?
try starting continuous movement on keydown, , halting on keyup. that's general way hold inputs.
Comments
Post a Comment