add some comments and commented out HG_Basic
Some checks failed
Spellcheck / Spellcheck (push) Failing after 10s
Tests / Evaluate Tests on ubuntu-latest (push) Successful in 51s

This commit is contained in:
2026-04-10 21:02:05 -04:00
parent d2f16fee48
commit 39ab19eec0
3 changed files with 14 additions and 8 deletions

View File

@@ -1,12 +1,14 @@
namespace GodotHelpers.Raycasts;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Godot;
using Godot.Collections;
using SJK.Functional;
namespace GodotHelpers.Raycasts;
/// <summary>
/// Extensions for <see cref="PhysicsDirectSpaceState3D"/>.
/// Allows for an static way of casting an godot Raycast3D.
/// </summary>
public static class RaycastExtensions
{
// --- 3D ---
@@ -45,6 +47,10 @@ public static class RaycastExtensions
// --- 2D ---
/// <summary>
/// Extensions for <see cref="PhysicsDirectSpaceState2D"/>.
/// Allows for an static way of casting an godot Raycast3D.
/// </summary>
public static RaycastResult2D? RaycastEx(this PhysicsDirectSpaceState2D space, Vector2 from, Vector2 to, uint collisionMask = uint.MaxValue, Rid[]? exclude = null, bool hitFromInside = false)
{
var query = new PhysicsRayQueryParameters2D