Add back in fixed margin code.
This commit is contained in:
@@ -537,6 +537,12 @@ void AnimatedModel::UpdateBounds()
|
||||
// No animation asset applied
|
||||
_box = SkinnedModel->GetBox(_transform.GetWorld());
|
||||
}
|
||||
|
||||
// Apply margin based on model dimensions
|
||||
const Vector3 modelBoxSize = SkinnedModel->GetBox(_transform.GetWorld()).GetSize();
|
||||
const Vector3 center = _box.GetCenter();
|
||||
const Vector3 sizeHalf = Vector3::Max(_box.GetSize() + modelBoxSize * 0.2f, modelBoxSize) * 0.5f;
|
||||
_box = BoundingBox(center - sizeHalf, center + sizeHalf);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user