I'm trying to convert this code that emits a RayCast3D from Camera3D into 2D:
func _process(delta):
var mouse_position: Vector2 = get_viewport().get_mouse_position()
ray_cast_3d.target_position = project_local_ray_normal(mouse_position) * 100.0 <<- Error!
ray_cast_3d.force_raycast_update()
if ray_cast_3d.is_colliding():
var collider = ray_cast_3d.get_collider()
print(collider)
I'm getting an error that project_local_ray_normal
is not a part of Camera2D class. I looked at the docs. for Camera2D but couldn't figure out the alternative. What should I do here?