fix render offset

This commit is contained in:
2025-09-21 22:55:22 +02:00
parent e1bb0b3683
commit 81ef6d8a29
3 changed files with 49 additions and 54 deletions

View File

@@ -23,7 +23,7 @@ namespace Voxel
public void PlaceBlock()
{
var (success, hit, x, y, z, normal) = _world.Raycast(Camera.Position, Camera.Front.Normalized(), 10);
var (success, hit, x, y, z, normal) = _world.Raycast(Camera.Position, Camera.Front.Normalized(), 8);
if (!success) return;
x += normal.X;
@@ -35,7 +35,7 @@ namespace Voxel
public void BreakBlock()
{
var (success, hit, x, y, z, normal) = _world.Raycast(Camera.Position, Camera.Front.Normalized(), 10);
var (success, hit, x, y, z, normal) = _world.Raycast(Camera.Position, Camera.Front.Normalized(), 8);
if (!success) return;
_world.SetBlock(x, y, z, Blocks.Air);