Fix missing BoundsScale usage on AnimatedModel

This commit is contained in:
Wojtek Figat
2025-04-22 11:02:53 +02:00
parent d30ff65800
commit a2ff6e5c24
2 changed files with 5 additions and 5 deletions

View File

@@ -766,7 +766,7 @@ void AnimatedModel::UpdateBounds()
// Apply margin based on model dimensions
const Vector3 modelBoxSize = modelBox.GetSize();
const Vector3 center = box.GetCenter();
const Vector3 sizeHalf = Vector3::Max(box.GetSize() + modelBoxSize * 0.2f, modelBoxSize) * 0.5f;
const Vector3 sizeHalf = Vector3::Max(box.GetSize() + modelBoxSize * 0.2f, modelBoxSize) * (0.5f * BoundsScale);
_box = BoundingBox(center - sizeHalf, center + sizeHalf);
}
else

View File

@@ -96,7 +96,7 @@ public:
bool PerBoneMotionBlur = true;
/// <summary>
/// If true, animation speed will be affected by the global time scale parameter.
/// If true, animation speed will be affected by the global timescale parameter.
/// </summary>
API_FIELD(Attributes="EditorOrder(30), DefaultValue(true), EditorDisplay(\"Skinned Model\")")
bool UseTimeScale = true;
@@ -108,7 +108,7 @@ public:
bool UpdateWhenOffscreen = false;
/// <summary>
/// The animation update delta time scale. Can be used to speed up animation playback or create slow motion effect.
/// The animation update delta timescale. Can be used to speed up animation playback or create slow motion effect.
/// </summary>
API_FIELD(Attributes="EditorOrder(45), EditorDisplay(\"Skinned Model\")")
float UpdateSpeed = 1.0f;
@@ -120,7 +120,7 @@ public:
AnimationUpdateMode UpdateMode = AnimationUpdateMode::Auto;
/// <summary>
/// The master scale parameter for the actor bounding box. Helps reducing mesh flickering effect on screen edges.
/// The master scale parameter for the actor bounding box. Helps to reduce mesh flickering effect on screen edges.
/// </summary>
API_FIELD(Attributes="EditorOrder(60), DefaultValue(1.5f), Limit(0), EditorDisplay(\"Skinned Model\")")
float BoundsScale = 1.5f;
@@ -388,7 +388,7 @@ public:
API_FUNCTION() void PauseSlotAnimation(const StringView& slotName, Animation* anim);
/// <summary>
/// Checks if the any animation playback is active on the any slot in Anim Graph (not paused).
/// Checks if any animation playback is active on any slot in Anim Graph (not paused).
/// </summary>
API_FUNCTION() bool IsPlayingSlotAnimation();