Fix startup crash where Hydra controllers are not properly plugged in

Crash occurs if the left controller is plugged in but right one isn't.
This commit is contained in:
David Rowe 2014-06-18 20:52:17 -07:00
parent c7b1b504b4
commit afab5f1cbf

View file

@ -66,7 +66,7 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) {
hand->getLeftRightPalmIndices(leftPalmIndex, rightPalmIndex);
const float HAND_RESTORATION_RATE = 0.25f;
if (leftPalmIndex == -1) {
if (leftPalmIndex == -1 || rightPalmIndex == -1) {
// palms are not yet set, use mouse
if (_owningAvatar->getHandState() == HAND_STATE_NULL) {
restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY);