- Home /
Side Scroller Script, Need help
Hey guys, Im using the basic character motor and character controller scripts but im trying to edit them in such a way that they only accept left and right motion, at the moment the game works fine, its just that if you press "up or down" the character falls off the edge. any help would be much appreciated. :)
Answer by Ellandar · Feb 23, 2013 at 09:52 AM
Hi Davidc,
If it's the CharacterMotor.js the quickest way would probably be to do a search for the variables:
var maxForwardSpeed : float = 10.0;
var maxSidewaysSpeed : float = 10.0;
var maxBackwardsSpeed : float = 10.0;
And set the relevant ones to 0. Similar situation for any other motor/movement scirpt. Either set the max speeds to 0 or delete the code that defines the inputs if they are obvious.
Rob
Your answer
![](https://koobas.hobune.stream/wayback/20220613093233im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I make a gui with buttons pop up in javasript? 1 Answer
Collision with Player and DoorTriggerLeft 0 Answers
Gun Firing help? 2 Answers
Full Screen Web Player? 7 Answers
multiple inputs 2 Answers