"Moving the player" tutorial contains errors- please assist.
In the "Moving the player" tutorial, you are instructed to use the following code in the "PlayerController" script:
rb.AddForce (movement * speed);
Here's the problem: "speed" is not recognized by either MonoDevelop, nor by Unity. By adding that parameter, the code becomes unusable.
Without being able to implement this code, the tutorial becomes useless, from this point onward.
Please, at your convenience:
1: Provide the correct code, that will allow the script to work, and
2: Fix the video tutorial, so that others are not prevented from completing this tutorial, as I have.
Thanks
If you're using the code here then you must be doing something wrong because it compiles just fine.
Did you include the line
public float speed;
speed is a variable so it needs to be declared.
Your answer
![](https://koobas.hobune.stream/wayback/20220612053645im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Space Shooter Bolt Speed Forward Issue 2 Answers
Broken Tutorial Files 2 Answers
SpaceShooter Tutorial instanced asteroid not taking GameController game object in unity5 0 Answers
FPS Microgame tutorial can't use mouse or keyboard during initial playtest -1 Answers
[HELP] Following the 2D character controller tutorial from the live training section (C#) 0 Answers