History

WIP checkpoint

* No longer normalizing scale in AnimSkeleton and AnimClip This means graph is animating in 'geometry' coordinates before unit scale is even applied. This is necessary to properly work with both Avatar based models and ModelEntity based models Many things are broken. * debug rendering (translations are x100) * IK hand targets * follow cam * I did not even dare to try HMD mode

Anthony J. Thibault committed 11 years ago

Commit 721da291 parent b054ef19 files · +72 −43Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+5−4
@@ -43,7 +43,8 @@ SkeletonModel::~SkeletonModel() { · 42 unmodified lines
4343
4444 void SkeletonModel::initJointStates() {
4545 const FBXGeometry& geometry = _geometry->getFBXGeometry();
46− glm::mat4 modelOffset = glm::scale(_scale) * glm::translate(_offset) * geometry.offset;
46+ glm::mat4 geometryOffset = geometry.offset;
47+ glm::mat4 modelOffset = glm::scale(_scale) * glm::translate(_offset);
4748
4849 int rootJointIndex = geometry.rootJointIndex;
4950 int leftHandJointIndex = geometry.leftHandJointIndex;
@@ -241,9 +242,9 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) { · 191 unmodified lines
241242 Model::simulate(deltaTime, fullUpdate);
242243
243244 // let rig compute the model offset
244− glm::vec3 modelOffset;
245− if (_rig->getModelOffset(modelOffset)) {
246− setOffset(modelOffset);
245+ glm::vec3 registrationPoint;
246+ if (_rig->getModelRegistrationPoint(registrationPoint)) {
247+ setOffset(registrationPoint);
247248 }
248249
249250 if (!isActive() || !_owningAvatar->isMyAvatar()) {

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