Revert "Fix Quest hand model orientation;"

This reverts commit a766bf4a35.
This commit is contained in:
bjorn 2022-09-26 14:58:34 -07:00
parent cd04060467
commit b5620fb185
1 changed files with 4 additions and 7 deletions

View File

@ -1662,8 +1662,9 @@ static ModelData* openxr_newModelData(Device device, bool animated) {
// Add a node that holds the skinned mesh
model->nodes[model->jointCount] = (ModelNode) {
.hasMatrix = true,
.transform = { MAT4_IDENTITY },
.transform.translation = { 0.f, 0.f, 0.f },
.transform.rotation = { 0.f, 0.f, 0.f, 1.f },
.transform.scale = { 1.f, 1.f, 1.f },
.primitiveIndex = 0,
.primitiveCount = 1,
.skin = 0
@ -1751,11 +1752,7 @@ static bool openxr_animate(Device device, Model* model) {
for (uint32_t i = 0; i < COUNTOF(joints); i++) {
if (jointParents[i] == ~0u) {
float position[4] = { 0.f, 0.f, 0.f };
// Quest hand rotation compensation
bool left = device == DEVICE_HAND_LEFT;
float orientation[4] = { -.5f, left ? .5f : -.5f, left ? .5f : -.5f, .5f };
float orientation[4] = { 0.f, 0.f, 0.f, 1.f };
lovrModelSetNodeTransform(model, i, position, scale, orientation, 1.f);
} else {
XrPosef* parent = &joints[jointParents[i]].pose;