content/hifi-content/angus/getJointTranslationRotation.js
2022-02-13 21:18:16 +01:00

16 lines
963 B
JavaScript

var name = "LeftHand";
var index = MyAvatar.getJointIndex(name);
print("$$$$$$$ Default translation: " + JSON.stringify(MyAvatar.getDefaultJointTranslation(index)));
print("....... Current translation: " + JSON.stringify(MyAvatar.getJointTranslation(index)));
print("....... Current translation: " + JSON.stringify(MyAvatar.getJointTranslation(name)));
// In desktop mode...
// The first two values are: { "x": 0.00004002200876129791, "y": 28.458751678466797, "z": -0.0001373291015625 }
// The third value is: { "x": 0, "y": 0, "z": 0 }
print("$$$$$$$ Default rotation: " + JSON.stringify(MyAvatar.getDefaultJointRotation(index)));
print("....... Current rotation: " + JSON.stringify(MyAvatar.getJointRotation(index)));
print("....... Current rotation: " + JSON.stringify(MyAvatar.getJointRotation(name)));
// The first two values are non-identity and different to each other.
// The third value is identity: { "x": 0, "y": 0, "z": 0, "w": 1 }