Browse Source

move chunks update from sync() to syncRec()

bstouls 8 năm trước cách đây
mục cha
commit
57ece10410
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      h3d/scene/World.hx

+ 3 - 3
h3d/scene/World.hx

@@ -455,9 +455,9 @@ class World extends Object {
 		updateChunkBounds(c, model, x, y, z, rotation, scale);
 	}
 
-	override function sync(ctx:RenderContext) {
-		super.sync(ctx);
-
+	override function syncRec(ctx:RenderContext) {
+		super.syncRec(ctx);
+		// don't do in sync() since animations in our world might affect our chunks
 		for( c in allChunks ) {
 			c.root.visible = c.bounds.inFrustum(ctx.camera.m);
 			if( c.root.visible ) {