mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
fix a bug in updateEntity() caused by the new properties not containing registrationPoint
This commit is contained in:
parent
c2adc6256e
commit
2a08a6d48e
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,13 @@ UpdateEntityOperator::UpdateEntityOperator(EntityTree* tree,
|
|||
// the getMaximumAACube is the relaxed form.
|
||||
_oldEntityCube = _existingEntity->getMaximumAACube();
|
||||
_oldEntityBox = _oldEntityCube.clamp(0.0f, 1.0f); // clamp to domain bounds
|
||||
|
||||
// If the old properties doesn't contain the properties required to calculate a bounding box,
|
||||
// get them from the existing entity. Registration point is required to correctly calculate
|
||||
// the bounding box.
|
||||
if (!_properties.registrationPointChanged()) {
|
||||
_properties.setRegistrationPoint(_existingEntity->getRegistrationPoint());
|
||||
}
|
||||
|
||||
// If the new properties has position OR dimension changes, but not both, we need to
|
||||
// get the old property value and set it in our properties in order for our bounds
|
||||
|
|
Loading…
Reference in a new issue