update
This commit is contained in:
@@ -20,11 +20,9 @@ namespace Voxel
|
||||
|
||||
public void BreakBlock()
|
||||
{
|
||||
var (hit, x, y, z) = _world.Raycast(5f); // max 5 blocks
|
||||
if (hit != Blocks.Air)
|
||||
{
|
||||
_world.SetBlock(x, y, z, Blocks.Air);
|
||||
}
|
||||
var (success, hit, x, y, z) = _world.Raycast(Camera.Position, Camera.Front * 10, 100);
|
||||
if (!success) return;
|
||||
_world.SetBlock(x, y, z, Blocks.Air);
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
|
||||
Reference in New Issue
Block a user