mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:17:25 +02:00
Fix attachments jitter
This commit is contained in:
parent
6f29d9e7b8
commit
739e184b52
4 changed files with 2 additions and 9 deletions
|
@ -2963,6 +2963,7 @@ void Application::update(float deltaTime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
myAvatar->harvestResultsFromPhysicsSimulation();
|
myAvatar->harvestResultsFromPhysicsSimulation();
|
||||||
|
myAvatar->simulateAttachments(deltaTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,6 @@ void Avatar::simulate(float deltaTime) {
|
||||||
PerformanceTimer perfTimer("skeleton");
|
PerformanceTimer perfTimer("skeleton");
|
||||||
_skeletonModel.getRig()->copyJointsFromJointData(_jointData);
|
_skeletonModel.getRig()->copyJointsFromJointData(_jointData);
|
||||||
_skeletonModel.simulate(deltaTime, _hasNewJointRotations || _hasNewJointTranslations);
|
_skeletonModel.simulate(deltaTime, _hasNewJointRotations || _hasNewJointTranslations);
|
||||||
simulateAttachments(deltaTime);
|
|
||||||
locationChanged(); // joints changed, so if there are any children, update them.
|
locationChanged(); // joints changed, so if there are any children, update them.
|
||||||
_hasNewJointRotations = false;
|
_hasNewJointRotations = false;
|
||||||
_hasNewJointTranslations = false;
|
_hasNewJointTranslations = false;
|
||||||
|
|
|
@ -69,6 +69,7 @@ public:
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void simulate(float deltaTime);
|
void simulate(float deltaTime);
|
||||||
|
void simulateAttachments(float deltaTime);
|
||||||
|
|
||||||
virtual void render(RenderArgs* renderArgs, const glm::vec3& cameraPosition);
|
virtual void render(RenderArgs* renderArgs, const glm::vec3& cameraPosition);
|
||||||
|
|
||||||
|
@ -87,7 +88,6 @@ public:
|
||||||
bool isInitialized() const { return _initialized; }
|
bool isInitialized() const { return _initialized; }
|
||||||
SkeletonModel& getSkeletonModel() { return _skeletonModel; }
|
SkeletonModel& getSkeletonModel() { return _skeletonModel; }
|
||||||
const SkeletonModel& getSkeletonModel() const { return _skeletonModel; }
|
const SkeletonModel& getSkeletonModel() const { return _skeletonModel; }
|
||||||
const QVector<Model*>& getAttachmentModels() const { return _attachmentModels; }
|
|
||||||
glm::vec3 getChestPosition() const;
|
glm::vec3 getChestPosition() const;
|
||||||
float getAvatarScale() const { return getScale().y; }
|
float getAvatarScale() const { return getScale().y; }
|
||||||
const Head* getHead() const { return static_cast<const Head*>(_headData); }
|
const Head* getHead() const { return static_cast<const Head*>(_headData); }
|
||||||
|
@ -217,8 +217,6 @@ protected:
|
||||||
virtual bool shouldRenderHead(const RenderArgs* renderArgs) const;
|
virtual bool shouldRenderHead(const RenderArgs* renderArgs) const;
|
||||||
virtual void fixupModelsInScene();
|
virtual void fixupModelsInScene();
|
||||||
|
|
||||||
void simulateAttachments(float deltaTime);
|
|
||||||
|
|
||||||
virtual void updateJointMappings();
|
virtual void updateJointMappings();
|
||||||
|
|
||||||
render::ItemID _renderItemID;
|
render::ItemID _renderItemID;
|
||||||
|
|
|
@ -323,11 +323,6 @@ void MyAvatar::simulate(float deltaTime) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
PerformanceTimer perfTimer("attachments");
|
|
||||||
simulateAttachments(deltaTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("joints");
|
PerformanceTimer perfTimer("joints");
|
||||||
// copy out the skeleton joints from the model
|
// copy out the skeleton joints from the model
|
||||||
|
|
Loading…
Reference in a new issue