* Deleted AnimationHandle class * Removed enableAnimGraph and anableRigAnimations from Menu. * Removed *some* references to old IK system. But it is still used when computing collision bounding volumes
Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 13 files). Show all
Unified · Split
| @@ -251,40 +251,6 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) { · 250 unmodified lines | ||
| 251 | 251 | // Don't take inputs if playing back a recording. |
| 252 | 252 | return; |
| 253 | 253 | } |
| 254 | − | |
| 255 | − const FBXGeometry& geometry = _geometry->getFBXGeometry(); | |
| 256 | − | |
| 257 | − // Don't Relax toward hand positions when in animGraph mode. | |
| 258 | − if (!_rig->getEnableAnimGraph()) { | |
| 259 | − | |
| 260 | − Hand* hand = _owningAvatar->getHand(); | |
| 261 | − auto leftPalm = hand->getCopyOfPalmData(HandData::LeftHand); | |
| 262 | − auto rightPalm = hand->getCopyOfPalmData(HandData::RightHand); | |
| 263 | − | |
| 264 | − const float HAND_RESTORATION_RATE = 0.25f; | |
| 265 | − if (!leftPalm.isActive() && !rightPalm.isActive()) { | |
| 266 | − // palms are not yet set, use mouse | |
| 267 | − if (_owningAvatar->getHandState() == HAND_STATE_NULL) { | |
| 268 | − restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); | |
| 269 | − } else { | |
| 270 | − // transform into model-frame | |
| 271 | − glm::vec3 handPosition = glm::inverse(_rotation) * (_owningAvatar->getHandPosition() - _translation); | |
| 272 | − applyHandPosition(geometry.rightHandJointIndex, handPosition); | |
| 273 | − } | |
| 274 | − restoreLeftHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); | |
| 275 | − } else { | |
| 276 | − if (leftPalm.isActive()) { | |
| 277 | − applyPalmData(geometry.leftHandJointIndex, leftPalm); | |
| 278 | − } else { | |
| 279 | − restoreLeftHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); | |
| 280 | − } | |
| 281 | − if (rightPalm.isActive()) { | |
| 282 | − applyPalmData(geometry.rightHandJointIndex, rightPalm); | |
| 283 | − } else { | |
| 284 | − restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); | |
| 285 | − } | |
| 286 | − } | |
| 287 | − } | |
| 288 | 254 | } |
| 289 | 255 | |
| 290 | 256 | void SkeletonModel::renderIKConstraints(gpu::Batch& batch) { |
| @@ -344,8 +310,6 @@ void SkeletonModel::applyPalmData(int jointIndex, const PalmData& palm) { · 53 unmodified lines | ||
| 344 | 310 | glm::quat inverseRotation = glm::inverse(_rotation); |
| 345 | 311 | glm::vec3 palmPosition = inverseRotation * (palm.getPosition() - _translation); |
| 346 | 312 | glm::quat palmRotation = inverseRotation * palm.getRotation(); |
| 347 | − | |
| 348 | − inverseKinematics(jointIndex, palmPosition, palmRotation, PALM_PRIORITY); | |
| 349 | 313 | } |
| 350 | 314 | |
| 351 | 315 | void SkeletonModel::renderJointConstraints(gpu::Batch& batch, int jointIndex) { |