Hello. I’m back with trying to create new project.
I’m started making simple game where model (train cab) should move forward by holding a “W” key on keyboard. How i can create simple script, where train must move like train - imagine you are holding a W and train is running. When you stop holding this key, train will be braking.
I want to simulate only forward and back moves. Forward for riding, but back for braking.
Camera is included inside the model - train cab and can be moved together.
I tried searching some tutorials but these vide were usually without using arrows/keys, just move like AI.
“searching some tutorials” is probably not going to be useful to you.
Try this method instead.
Two steps to tutorials and / or example code:
do them perfectly, to the letter (zero typos, including punctuation and capitalization)
stop and understand each step to understand what is going on.
If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.
If you cannot get it from tutorials, you CERTAINLY will not get it from this text box!!!