Check if the given point is colliding without adding node to scene

Godot Version

4.3

Question

Is there any way to check if the given point is colliding without add node to scene.
Can i check via code, something like this (in 2D):

Raycast2D.CheckCollide(vec2 position, vec2 target, int collision_mark) -> bool

There is PhysicsRayQueryParameters2D in gdscript that can be used this way. All you need to do is provide a start point and target point and it reports the first collision along the ray.

1 Like

Thank you for quick rep. I will try now.

1 Like

Addition (It works)

Here is the code i implement for my character check colliding:
image

1 Like