Answer the question
In order to leave comments, you need to log in
Axis inversion (standard)?
There is a standard "Horizontal" axis - with standard values:
Now when I rotate the character - i.e. the sprite along the x axis - this axis in the InputManager does not work correctly, to fix this I want to do something like this:
if(fR.transform.rotation.x==-180)
{
//инвертировать ось управления (там на скриншоте есть галочка Invert) - т.е что то типа Axixs.Invert=true;
}
else{Axixs.Invert=false;}
float move = Input.GetAxis("Horizontal");
Answer the question
In order to leave comments, you need to log in
The control axis is not tied to the character in any way. And to use an invert in the input for this is not worth it. GetAxis returns you a numeric value, which you must interpret however you like.
In general, it is strange that there are some problems with rotation - somewhere you messed up with local and global coordinates.
Inversion by hand is easy - GetAxis () * -1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question