Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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