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