Thread: key duration
View Single Post
  #2  
Old 04-19-2021, 03:03 PM
kennethkarthik kennethkarthik is offline
Moderator
 
Join Date: Jul 2018
Posts: 8
Hey Roy,

If you don't want yield statements terminating your scene, I would suggest using the onkeydown and onkeyup function in the vizact library. Use the respective up and down functions to log the time using viz.tick() in global variables and then find the difference to calculate the elapsed time. This should occur without causing any disruption in the scene being run.

Hope it helps.

Best,
Kenneth
Reply With Quote