mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
controller/hand offset
This commit is contained in:
parent
2ac6b6cd32
commit
f2436bc00a
1 changed files with 3 additions and 0 deletions
|
@ -208,6 +208,9 @@ void ViveControllerManager::handlePoseEvent(const mat4& mat, int index) {
|
||||||
rotation = rotation * glm::angleAxis(PI, glm::vec3(1.0f, 0.0f, 0.0f)) * glm::angleAxis(PI + PI_OVER_TWO, glm::vec3(0.0f, 0.0f, 1.0f));
|
rotation = rotation * glm::angleAxis(PI, glm::vec3(1.0f, 0.0f, 0.0f)) * glm::angleAxis(PI + PI_OVER_TWO, glm::vec3(0.0f, 0.0f, 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const float CONTROLLER_LENGTH_OFFSET = 0.1f;
|
||||||
|
position += rotation * glm::vec3(0, 0, -CONTROLLER_LENGTH_OFFSET);
|
||||||
|
|
||||||
_poseStateMap[makeInput(JointChannel(index)).getChannel()] = UserInputMapper::PoseValue(position, rotation);
|
_poseStateMap[makeInput(JointChannel(index)).getChannel()] = UserInputMapper::PoseValue(position, rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue