mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:55:36 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into tot
This commit is contained in:
commit
b8e44a3e7a
3 changed files with 9 additions and 7 deletions
|
@ -146,11 +146,6 @@ void SixenseManager::update(float deltaTime) {
|
|||
#ifdef HAVE_SIXENSE
|
||||
Hand* hand = Application::getInstance()->getAvatar()->getHand();
|
||||
if (_isInitialized && _isEnabled) {
|
||||
// Disable the hands (and return to default pose) if both controllers are at base station
|
||||
for (std::vector<PalmData>::iterator it = hand->getPalms().begin(); it != hand->getPalms().end(); it++) {
|
||||
it->setActive(!_controllersAtBase);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
SixenseBaseFunction sixenseGetNumActiveControllers =
|
||||
(SixenseBaseFunction) _sixenseLibrary->resolve("sixenseGetNumActiveControllers");
|
||||
|
@ -213,6 +208,14 @@ void SixenseManager::update(float deltaTime) {
|
|||
qDebug("Found new Sixense controller, ID %i", data->controller_index);
|
||||
}
|
||||
|
||||
// Disable the hands (and return to default pose) if both controllers are at base station
|
||||
if (foundHand) {
|
||||
palm->setActive(!_controllersAtBase);
|
||||
} else {
|
||||
palm->setActive(false); // if this isn't a Sixsense ID palm, always make it inactive
|
||||
}
|
||||
|
||||
|
||||
// Read controller buttons and joystick into the hand
|
||||
palm->setControllerButtons(data->buttons);
|
||||
palm->setTrigger(data->trigger);
|
||||
|
|
|
@ -176,7 +176,7 @@ void JointState::clearTransformTranslation() {
|
|||
void JointState::applyRotationDelta(const glm::quat& delta, bool constrain, float priority) {
|
||||
// NOTE: delta is in model-frame
|
||||
assert(_fbxJoint != NULL);
|
||||
if (priority < _animationPriority || delta.null) {
|
||||
if (priority < _animationPriority || delta == glm::quat()) {
|
||||
return;
|
||||
}
|
||||
_animationPriority = priority;
|
||||
|
|
|
@ -590,7 +590,6 @@ void Model::recalculateMeshBoxes(bool pickAgainstTriangles) {
|
|||
bool calculatedMeshTrianglesNeeded = pickAgainstTriangles && !_calculatedMeshTrianglesValid;
|
||||
|
||||
if (!_calculatedMeshBoxesValid || calculatedMeshTrianglesNeeded) {
|
||||
PerformanceTimer perfTimer("calculatedMeshBoxes");
|
||||
const FBXGeometry& geometry = _geometry->getFBXGeometry();
|
||||
int numberOfMeshes = geometry.meshes.size();
|
||||
_calculatedMeshBoxes.resize(numberOfMeshes);
|
||||
|
|
Loading…
Reference in a new issue