Add ability to remove placed blocks

This commit is contained in:
Sofia 2024-08-20 03:33:29 +03:00
parent da60de0148
commit 8bac5dbe77

View File

@ -3,7 +3,7 @@ using Godot;
namespace Gmtk24 {
public static class Util {
public static RaycastResult? RaycastFromMouse(Camera3D camera, uint mask = 0b1000) {
public static RaycastResult? RaycastFromMouse(Camera3D camera, uint mask = 0b11000) {
var viewport = camera.GetViewport();
var origin = camera.ProjectRayOrigin(viewport.GetMousePosition());
var normal = camera.ProjectRayNormal(viewport.GetMousePosition()) * 10000;