mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:36:57 +02:00
Merge pull request #7622 from hyperlogic/tony/frozen-avatar-fix
Fix for frozen ghost avatars
This commit is contained in:
commit
94f970dd89
1 changed files with 3 additions and 2 deletions
|
@ -187,9 +187,10 @@ void Avatar::simulate(float deltaTime) {
|
||||||
|
|
||||||
// simple frustum check
|
// simple frustum check
|
||||||
float boundingRadius = getBoundingRadius();
|
float boundingRadius = getBoundingRadius();
|
||||||
bool inView = qApp->getDisplayViewFrustum()->sphereIntersectsFrustum(getPosition(), boundingRadius);
|
bool avatarPositionInView = qApp->getDisplayViewFrustum()->sphereIntersectsFrustum(getPosition(), boundingRadius);
|
||||||
|
bool avatarMeshInView = qApp->getDisplayViewFrustum()->boxIntersectsFrustum(_skeletonModel->getRenderableMeshBound());
|
||||||
|
|
||||||
if (_shouldAnimate && !_shouldSkipRender && inView) {
|
if (_shouldAnimate && !_shouldSkipRender && (avatarPositionInView || avatarMeshInView)) {
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("skeleton");
|
PerformanceTimer perfTimer("skeleton");
|
||||||
_skeletonModel->getRig()->copyJointsFromJointData(_jointData);
|
_skeletonModel->getRig()->copyJointsFromJointData(_jointData);
|
||||||
|
|
Loading…
Reference in a new issue