Tank shooting too low for crosshair

Hey guys,

I’m currently at lesson #161 of the Battle Tank course and I’ve just noticed I have to aim above the enemy ai tanks to hit them even though I’m using the SuggestProjectileVelocity method which should give me the right barrel elevation to hit my targets. Whenever I start the game, the AIs all manage to hit me on the first try whereas if I aim at their center of mass (the tank bodies) my barrel elevates and the projectile drops before reaching my crosshair.

Any idea as to why this is happening? Or is it normal considering where I am in the course and we haven’t refactored aiming yet?

Thank you

My first suggestion would be to check that your GetSightRayHitLocation function is aligned correctly with your crosshair. AI tanks don’t have a UI crosshair to work from so an issue like this wouldn’t have an effect on them, but it would on the player. So I’d suspect something wrong in this area.

Privacy & Terms