mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Fix for incorrectly scaled bounding volumes when switching avatars
Make sure to explicitly set the _geometryToRigTransform in Rig::initJointStates(). This should fix small bounding volume when switching from the Gamebot avatar (which has 0.008 scaling) to another avatar (which ususally have 0.01 scaling).
This commit is contained in:
parent
f46198c2fd
commit
e9b8e5431d
1 changed files with 2 additions and 0 deletions
|
@ -168,6 +168,8 @@ void Rig::destroyAnimGraph() {
|
|||
void Rig::initJointStates(const FBXGeometry& geometry, const glm::mat4& modelOffset) {
|
||||
_geometryOffset = AnimPose(geometry.offset);
|
||||
_invGeometryOffset = _geometryOffset.inverse();
|
||||
_geometryToRigTransform = modelOffset * geometry.offset;
|
||||
_rigToGeometryTransform = glm::inverse(_geometryToRigTransform);
|
||||
setModelOffset(modelOffset);
|
||||
|
||||
_animSkeleton = std::make_shared<AnimSkeleton>(geometry);
|
||||
|
|
Loading…
Reference in a new issue