hi i´ve been searching for a solid answer for what i want to do but i just can't find anything like what i´m trying to do. i have the character grabbing a wall (ninja gaiden style) so his movements are only in the Y axis, just up and down, but when i press any of the Horizontal axis he just go down... this is fine, so what im trying to do here is that when he is on the wall just ignore the Horizontal inputs, only when he is on the wall, basically do nothing when any of the horizontal buttons are pressed. Thank you
make boolean onWall. Then you can change it. Maybe with OnColliderEnter2D set it true, OnColliderExit2D set it false. And then: if (!onWall) { //here your moving on x-axe }
that worked just fine, i actually had a bool called touchingWall, so i just have to put the X axis code inside an If that says: if (grounded && !touchingWall) then do the X axis so when he is touching wall he doesn't move anymore.