class Godot::RaycastBuilder2D

Overview

Fluent builder for constructing and executing 2D raycasts.

Defined in:

libgodot/extensions/physics.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

try?(&)
try?
try?

Constructor Detail

def self.new(origin_node : Node2D, to_pos : Vector2 | Nil = nil) #

Instance Method Detail

def areas(enable : Bool = true) : self #

def bodies(enable : Bool = true) : self #

def collide? : Bool #

def collide_with_areas? : Bool #

def collide_with_bodies? : Bool #

def direction(dir : Vector2, distance : Float64 = 100.0) : self #

def exclude(list : Enumerable(Godot::Object | Godot::RID)) : self #

def exclude(*objects : Godot::Object | Godot::RID) : self #

def exclude_list : Array(Godot::Object | Godot::RID) #

def from(pos : Vector2) : self #

def from_pos : Vector2 #

def mask(mask : UInt32 | Int) : self #

def mask_val : UInt32 #

def origin_node : Node2D #

def query : PhysicsHit2D | Nil #

def to(pos : Vector2) : self #

def to_pos : Vector2 | Nil #