There is something the prevents the aim from working

I am trying to get the aim to work, the code compiles and it runs, however when looking at the log I get these two error messages
CompilerResultsLog:Error: Error D:\PROJECTS\UNREAL\04_BattleTank\BattleTank\Source\BattleTank\Private\TankAimingComponent.cpp(96) : warning C4458: declaration of ‘AimDirection’ hides class member

CompilerResultsLog:Error: Error D:\PROJECTS\UNREAL\04_BattleTank\BattleTank\Source\BattleTank\Public\TankAimingComponent.h(76) : note: see declaration of ‘UTankAimingComponent::AimDirection’

I tried moving AimDirection from private to public to no avail. Is there something that I am missing?
Thank You!

Hi Alienguard!

I had the same warning, i solved changing the name of the parameter AimDirection in MoveBarrelTowards method to another and worked for me.

my method stayed like this

In your Code you have two declaration of AimDirecton

Privacy & Terms