Skip to content

Commit a04e4fe

Browse files
committed
FX: fix culling for negative scales
1 parent 49dbfc8 commit a04e4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hrt/prefab/fx/FX.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class FXAnimation extends h3d.scene.Object {
9595
if( enableCulling ) {
9696
culled = false;
9797
var scale = getAbsPos().getScale(tempVec);
98-
var uniScale = hxd.Math.max(hxd.Math.max(scale.x, scale.y), scale.z);
98+
var uniScale = hxd.Math.abs(hxd.Math.abs(hxd.Math.max(hxd.Math.max(scale.x, scale.y), scale.z)));
9999
var pos = getAbsPos().getPosition(tempVec);
100100
tmpSphere.load(pos.x, pos.y, pos.z, cullingRadius * uniScale);
101101
if(!ctx.camera.frustum.hasSphere(tmpSphere))

0 commit comments

Comments
 (0)