Last active
December 31, 2017 17:02
-
-
Save letoram/5ec2fd5fb9a24889354b0c7312cdca92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vrtest() | |
camera = null_surface(1, 1); | |
camtag_model(camera, 0.1, 100.0, 45.0, 1.33, 1, 1); | |
forward3d_model(camera, -10.0); | |
local cp = target_alloc("vrtest", function(source, status) | |
if (status.kind == "preroll") then | |
target_displayhint(source, 1024, 1024); | |
end | |
end); | |
cube = build_3dbox(1, 1, 1); | |
image_sharestorage(cp, cube); | |
vr_setup("", function(source, status) | |
if (status.kind == "limb_added") then | |
print("got limb", status.name); | |
if (status.name == "neck") then | |
vr_map_limb(source, cube, status.id); | |
end | |
elseif (status.kind == "limb_removed") then | |
print("lost limb", status.name); | |
end | |
end); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment