fix render offset
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user