File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public override void OnAwake()
2525 ImageLoader . LoadTexture ( AssetsPaths . ASSETS + "Textures\\ TextureAtlasBig2.png" ) ;
2626 Kernel . Instance . Context . CreateShader ( AssetsPaths . ASSETS + "Shaders\\ VoxelShader" ) ;
2727
28- if ( false )
28+ if ( true )
2929 {
3030 var controller = Entity . Manager . CreateCamera ( name : "Controller" ) . Entity ;
3131 controller . Transform . SetPosition ( y : 200 ) ;
Original file line number Diff line number Diff line change @@ -222,7 +222,8 @@ private bool IsCollidingAtPosition(Vector3 position)
222222 Vector3Int voxelPosition = new Vector3Int ( x , y , z ) ;
223223 Generator . GetChunkFromPosition ( voxelPosition , out var chunk , out var localVoxelPosition ) ;
224224
225- if ( chunk != null && chunk . IsVoxelSolid ( localVoxelPosition ) )
225+ if ( chunk is not null && chunk . SolidVoxelData is not null )
226+ if ( chunk . IsVoxelSolid ( localVoxelPosition ) )
226227 // Collision detected
227228 return true ;
228229 }
Original file line number Diff line number Diff line change @@ -141,8 +141,9 @@ private bool IsVoxelSolid(Vector3Int voxelPosition)
141141 // Retrieve the voxel at the given position
142142 Generator . GetChunkFromPosition ( voxelPosition , out var chunk , out var localVoxelPosition ) ;
143143
144- if ( chunk is not null && chunk . IsVoxelSolid ( localVoxelPosition ) )
145- return true ;
144+ if ( chunk is not null && chunk . SolidVoxelData is not null )
145+ if ( chunk . IsVoxelSolid ( localVoxelPosition ) )
146+ return true ;
146147
147148 return false ;
148149 }
You can’t perform that action at this time.
0 commit comments