Don't move pointer finger of simulated hand for pinch gestures?
@@ -46,19 +46,20 @@ const hand_t &input_hand(handed_ hand) {
///////////////////////////////////////////
-void modify(pose_t *pose) {
+void modify(pose_t *pose, vec3 offset) {
quat rot = quat_from_angles(0, 180, 0);
for (size_t i = 0; i < 25; i++) {
+ pose[i].position += offset;
pose[i].position *= 1.15f;
pose[i].orientation = rot * pose[i].orientation;
}
}
void input_hand_init() {
- modify(&input_pose_fist [0][0]);
- modify(&input_pose_neutral[0][0]);
- modify(&input_pose_point [0][0]);
- modify(&input_pose_pinch [0][0]);
+ modify(&input_pose_fist [0][0], {});
+ modify(&input_pose_neutral[0][0], {});
+ modify(&input_pose_point [0][0], {});
+ modify(&input_pose_pinch [0][0], vec3{ 0.02675417f,0.02690793f,-0.07531749f }-vec3{0.04969539f,0.02166998f,-0.0236005f});
material_t hand_mat = material_copy_id("default/material");
material_set_transparency(hand_mat, transparency_blend);
