mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
rotation offset for hydra controllers
This commit is contained in:
parent
8c8a29f477
commit
843a4db650
1 changed files with 5 additions and 0 deletions
|
@ -154,6 +154,11 @@ void SixenseManager::update(float deltaTime) {
|
|||
// no latency.
|
||||
float velocityFilter = glm::clamp(1.0f - glm::length(rawVelocity), 0.0f, 1.0f);
|
||||
palm->setRawPosition(palm->getRawPosition() * velocityFilter + position * (1.0f - velocityFilter));
|
||||
|
||||
// adjustment for hydra controllers fit into hands
|
||||
float sign = (i == 0) ? -1.0f : 1.0f;
|
||||
rotation *= glm::angleAxis(sign * PI/4.0f, glm::vec3(0.0f, 0.0f, 1.0f));
|
||||
|
||||
palm->setRawRotation(safeMix(palm->getRawRotation(), rotation, 1.0f - velocityFilter));
|
||||
|
||||
// use the velocity to determine whether there's any movement (if the hand isn't new)
|
||||
|
|
Loading…
Reference in a new issue