Why adding condition in IF change camera pos ?!

I suggest that you print what action.x and y is here. It sounds like the values might be 0,0