AI tank firing function (help)

Okey so I were wondering is it bad practice to include a header file from a component far down our inheritance tree? The reason why I ask is because I were planning on using the rotation of the turret (with a modifier) to set an area were the the AI is allowed to fire. For example we have the aim on X=43 then the AI tank can fire on X± 15 for example.

So should I go through the tank down throught the aimingcomponent or include the header itself for the turret. In other words this is a question of good morals

#includeing a header file is just copying and pasting it so I’m not sure what you mean. Could you give a (pseudo) code example?

Privacy & Terms