History

fix collision shape of avatars

Andrew Meadows committed 11 years ago

Commit 16dfc391 parent 41daea72 files · +22 −35Browse files

Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 2 files). Show all

Unified · Split

interface/src/avatar/SkeletonModel.cpp+5−8
@@ -547,14 +547,11 @@ void SkeletonModel::computeBoundingShape() { · 546 unmodified lines
547 // compute the default transform of this joint547 // compute the default transform of this joint
548 const JointState& state = _rig->getJointState(i);548 const JointState& state = _rig->getJointState(i);
549 549
550 // HACK WORKAROUND: ignore joints that may have bad translation (e.g. have been flagged as such with zero radius)550 // Each joint contributes a sphere at its position
551 if (state.getBoneRadius() > 0.0f) {551 glm::vec3 axis(state.getBoneRadius());
552 // Each joint contributes a sphere at its position552 glm::vec3 jointPosition = state.getPosition();
553 glm::vec3 axis(state.getBoneRadius());553 totalExtents.addPoint(jointPosition + axis);
554 glm::vec3 jointPosition = state.getPosition();554 totalExtents.addPoint(jointPosition - axis);
555 totalExtents.addPoint(jointPosition + axis);
556 totalExtents.addPoint(jointPosition - axis);
557 }
558 }555 }
559 556
560 // compute bounding shape parameters557 // compute bounding shape parameters

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t