its nothing big at the moment but a beginning at least
so, the problem is, when I press one of the three buttons the character is starting his punching animation and when i place a building he stargt to punch again. which is not so bad because he should start this punching thing when you press the left mousekey.
my question is, how do i disable the punching animation when iam in the button area? and how do i stop it when iam placing one of the objects (ffence, log or bridge)
Connecting to you question I think you should remember the buttons rectangle and check mouse position. If mouse clicking over the buttons area you will disable animation, in other words donβt play animation if mouse clicking over the button.
But the right way is to have only one Controler Controller wich responsible for key and mouse input and all ckecks, another components should use him to detect actions.
whenever i click the mouse the player does nothing, and when i press the space bar, has a strange move.
as a suggestion, try another statements to control your character controller, probably remaking it would solve more than one problem.