Platform Compatibility
PC | Mac OSX | Oculus Quest |
---|---|---|
X | X | X |
onClick triggers whenever the object is clicked on with a mouse or a VR hand trigger
Parameters:
- type
- An integer value between 0 and 4
- 0 – Left click
- 1 – Left hand trigger (VR)
- 2 – Right hand trigger (VR)
- 3 – Right click
- 4 – Middle click
- 5 – Gamepad left trigger
- 6 – Gamepad right trigger
- An integer value between 0 and 4
Example:
1 2 3 | function onClick(type) obj.set3DText("You Clicked Me With: " .. type) end |