For some weird reason my boolean value for the hitlocation always returned a 1.
I was wondering why I was getting a 1 the whole time, I would like to know how to fix this and I also ask if this has anything to do with my aiming not being smooth, it doesn’t always find where i’m aiming but I still get a return of 1?
It doessn’t matter what GetLookVectorHitLocation returns because it’s just going to fall to that outside return true statement. If you add a return within that if statement it should get what you expect.
if (GetLookDirection(ScreenLocation, LookDirection)) {
return GetLookVectorHitLocation(LookDirection, HitLocation);
}
there must be something wrong with it however, because whenever I attempt to aim at the hills or higher my barrel does not follow, I have a limited distance in which I can aim up or down, aiming 360 is fine
But I wouldn’t understand why I can’t aim at the hills next to me without the aiming not following, give it a shot and when you spawn look around to the left at the hills and try look up them, your aiming will come to a hault. I’m not sure why mine does it because I’d assume it is able to find an aim solution to the hills next to me but I may be wrong
This actually fixes it, I didn’t expect it to because I have done the same thing before only I set the launch speed way too high so it wouldn’t actually look up and down at all.