| Event | Trigger | |-------|---------| | onGrab(player, hand) | Object is grasped | | onRelease(player, hand) | Object is let go | | onCollisionEnter(other) | Two physical objects touch | | onLookAt(player, duration) | Gaze stays on object for X seconds | | onVoiceCommand(player, phrase) | Player says a registered phrase |
Have a clever SkyVR script snippet? Share it in the comments below or tag us with #SkyVRScript. Alex Chen, VR dev rel engineer. Loves procedural hand animations and low-latency haptics. skyvr script
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. | Event | Trigger | |-------|---------| | onGrab(player,
Now go pinch, grab, and gaze your way to something amazing. Loves procedural hand animations and low-latency haptics
-- 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