PR #15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having precisely the same position.
To address this problem, this PR adds a new field, use_aabb, to VisibilityRange, which makes the AABB center point behavior opt-in.
@BenjaminBrienen first noticed this issue when reviewing PR #16286. That PR contains a video showing the effects of this regression on the visibility_range example. This commit fixes that example.
Migration Guide
The VisibilityRange component now has an extra field, use_aabb. Generally, you can safely set it to false.
PR #15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having precisely the same position.
To address this problem, this PR adds a new field,
use_aabb
, toVisibilityRange
, which makes the AABB center point behavior opt-in.@BenjaminBrienen first noticed this issue when reviewing PR #16286. That PR contains a video showing the effects of this regression on the
visibility_range
example. This commit fixes that example.Migration Guide
VisibilityRange
component now has an extra field,use_aabb
. Generally, you can safely set it to false.