14 if(!(scn->load("data/vrhands.obj"))) {
17 scn->objects[0]->node->set_position(Vec3(0, 150, 0));
18 scn->objects[1]->node->set_position(Vec3(0, 250, 0));
24 void destroy_vrhands()
30 void update_vrhands(const Avatar *avatar)
33 qbodyrot.set_rotation(Vec3(0, 1, 0), -deg_to_rad(avatar->get_body_rotation()));
34 Vec3 pos = avatar->get_position();
36 for(int i=0; i<2; i++) {
37 if(goatvr_hand_active(i)) {
38 goatvr_hand_position(i, &vrhand[i].pos.x);
39 goatvr_hand_orientation(i, &vrhand[i].rot.x);
41 vrhand[i].pos = rotate(vrhand[i].pos, qbodyrot) + pos;
42 vrhand[i].rot = qbodyrot * vrhand[i].rot;
44 vrhand[i].valid = true;
46 vrhand[i].valid = false;