Hey everyone!
I have created a VR raytracing system by following a tutorial.
Everything works fine, but I want to create something that I just can’t figure out.
I’ve got three raytrace events. One executes on focus (OnFocus), one activates on defocus (OnBlur) and the other one executes after 3 seconds (OnActivate). The three seconds time window is defined by the GetFocusTimeActive.
At the moment, whenever the player looks at the cube (OnFocus), the cube scales. Whenever the player defocus (OnBlur) the timeline is reversed and the cube gets smaller. And after three seconds of looking at the cube, the cube turns red (OnActive).
There is one problem however. The 3 seconds timer is set to 0 seconds on defocus, but the cube is still scaling down. How can I synchronise the timer and the scaling cube? So whenever the cubes timeline is at 50%, the GetFocusTimeActive is at 1.5 seconds.
Thanks in advance and have a nice day!