mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Merge pull request #3834 from ZappoMan/fixMissingRegistrationPointBug
fix a major bug in updateEntity() caused by the new properties not containing "registrationPoint"
This commit is contained in:
commit
63be5ae9bf
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,13 @@ UpdateEntityOperator::UpdateEntityOperator(EntityTree* tree,
|
||||||
// the getMaximumAACube is the relaxed form.
|
// the getMaximumAACube is the relaxed form.
|
||||||
_oldEntityCube = _existingEntity->getMaximumAACube();
|
_oldEntityCube = _existingEntity->getMaximumAACube();
|
||||||
_oldEntityBox = _oldEntityCube.clamp(0.0f, 1.0f); // clamp to domain bounds
|
_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
|
// 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
|
// get the old property value and set it in our properties in order for our bounds
|
||||||
|
|
Loading…
Reference in a new issue