How do I switch control values?


So I’m making a simple platformer and I found out that under the input platform controller, if you set [sideways speed] to a negative value, you invert the left/right controls. The question I have is: How do I switch between a positive value and a negative value upon pressing a button like “M”?

Lets say sideways speed is by default.

sidewaysSpeed = 1;

Head to the input platformer controller script and add…

sidewaysSpeed = -1;

This number can be changed to suit your needs. :slight_smile: