Now go pinch, grab, and gaze your way to something amazing.
In this post, we’ll break down what SkyVR Script is, how to write your first script, and three pro tips for lag-free VR logic. SkyVR Script is a Lua-like scripting language designed specifically for user-generated content inside the SkyVR ecosystem. It runs on the client (headset) for low-latency hand interactions and on the server for synchronized multiplayer events.
-- light_switch.lua -- Attached to a switch model with a child Light component function onPinch(player, hand) local light = self:getComponent("Light") if light then light.enabled = not light.enabled self:playSound("click.wav") player:sendHapticPulse(hand, 0.2) -- 200ms buzz end end
Think of it as the glue between your gestures, world objects, and avatar behavior.
function onUpdate() local thumb = player:getFingerCurl("right", "thumb") local index = player:getFingerCurl("right", "index") if thumb > 0.9 and index > 0.9 then self:triggerVictory() end end SkyVR includes a visual script debugger. While wearing the headset, say “Show Script Console” to see print() output floating above your wrist. You can also use:
Now go pinch, grab, and gaze your way to something amazing.
In this post, we’ll break down what SkyVR Script is, how to write your first script, and three pro tips for lag-free VR logic. SkyVR Script is a Lua-like scripting language designed specifically for user-generated content inside the SkyVR ecosystem. It runs on the client (headset) for low-latency hand interactions and on the server for synchronized multiplayer events.
-- light_switch.lua -- Attached to a switch model with a child Light component function onPinch(player, hand) local light = self:getComponent("Light") if light then light.enabled = not light.enabled self:playSound("click.wav") player:sendHapticPulse(hand, 0.2) -- 200ms buzz end end
Think of it as the glue between your gestures, world objects, and avatar behavior.
function onUpdate() local thumb = player:getFingerCurl("right", "thumb") local index = player:getFingerCurl("right", "index") if thumb > 0.9 and index > 0.9 then self:triggerVictory() end end SkyVR includes a visual script debugger. While wearing the headset, say “Show Script Console” to see print() output floating above your wrist. You can also use: