Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Built-In Functions
  5. onFrameTick

onFrameTick

Platform Compatibility

PC Mac OSX Oculus Quest
X X X

onFrameTick triggers every frame with a deltaTime variable for keeping value changes consistent no matter what FPS the application runs at

Parameters:

  • dt
    • A decimal number that is used to adjust for fluctuations in framerate

Example:

1
2
3
4
function onFrameTick(dt)
    --Adds up by 1 every second
    myValue = myValue + (1 * dt)
end
Tags
Was this article helpful to you? Yes No

How can we help?