Unity Create with Code Challenge 1
Hi, here's the link for this coding challenge. I think I was able to solve the other questions for this challenge, but I can't really test it because my plane is only moving forward once, at a distance of whatever I set my speed value to.
Here's the full code for this function:
void FixedUpdate()
{
// get the user's vertical input
verticalInput = Input.GetAxis("Vertical");
// move the plane forward at a constant rate
transform.Translate(Vector3.forward * speed);
// tilt the plane up/down based on up/down arrow keys
transform.Rotate(Vector3.right * rotationSpeed * Time.deltaTime);
}
I've also tried transform.Translate(Vector3.forward speed Time.deltaTime) but it still gives me the same result - plane will move just once. I'm guessing there's a setting I don't know about because it looks like the animation lasts only 1 frame.
I looked up a solution on Youtube and they literally did the same thing as me, but it worked for them. Please help me!
Your answer
Follow this Question
Related Questions
Vector2 not being recognised? 0 Answers
Isometric movement for MoveTowards 0 Answers
Bugs on move in air(falling); 0 Answers
moving an object continuously between waypoints 0 Answers
C# finding the axis of a characterobject 0 Answers