Raycasting in the direction of a target but with a fixed angle to the ground

Hello, I seem to be in a bit of a pickle with a piece of code. I have a click-to-move Character and I’m trying to check if there is a ground-gap right next to my character, in the direction of target/click-position…
I’m using :

	Vector3 downwards45 = ( Vector3.forward - Vector3.up).normalized;

the angle to ground is great but as you can imagine, it’s not considering the target/click position…

            Vector3  targetDir = target.transform.position - this.transform.position;

            Vector3 downwards45 = (targetDir  - Vector3.up);

it almost works but the angle to ground is not fixed, but rather depends on the target position…

Help would be much appreciated… thanks

Instead of Vector3.forward you could either use the forward vector of your character (YourCharacter.transform.forward) or calculate the vector that describes the direction from your character to the target/click-position (Target - YourCharacter.transform.position).