Raycast2D and RidgidBody2d question

I’m struggling to accomplish a task. I included a photo to better represent what I am trying to achieve.

When the AI fires a cannonball it flies up and over a mountain and it may hit an obstacle before reaching it’s intended target. Just before the cannonball gets destroyed I want to test to see if it is lined up to hit the target or miss it. This data will help me calculate the next shot.

Since the 2D Sprite representing the cannonball doesn’t return any rotation information, I must rely on the RidgidBody2D and physics. But transferring that information to the Raycaster2D has me baffled at the moment.

The RidgidBody2D has a member that is Rotation (float around the X Axis). But the Raycast2D has a direction parameter for direction that takes a Vector2(); I am guessing that I am looking the wrong place to achieve this task?

Any help much appreciated.

After pouring through docs and web searches I created the 2 lines of code to get what I needed.

Vector2 angleOfRD = new Vector2(_rb.velocity.x, _rb.velocity.y);
RaycastHit2D[] AI_rayHit = Physics2D.RaycastAll(transform.position, angleOfRD);

RayCastAll() allows me to see everything that is along the ray. all day for 2 lines of code, wow.