Thread: key duration
View Single Post
Old 04-19-2021, 04:03 PM
kennethkarthik kennethkarthik is offline
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.

Reply With Quote