I am having trouble getting my ship to move forward. When I press and hold the "W" key the ship gets just a tiny amount o…

Forum Archive I am having trouble getting my ship to move forward. When I press and hold the "W" key the ship gets just a tiny amount o…

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4668
    beezerlm
    Participant

      I am having trouble getting my ship to move forward. When I press and hold the “W” key the ship gets just a tiny amount of thrust and the thrust stops even though I am holding the key down. When I release the key, the ship also gets just a tiny amount of thrust for a split second. All other movement is fine.

      When typing in the script Unity told me the script was using obsolete methods and it was going to update the script. This changed the following line:

      rigidbody2D.AddForce(transform.up * (speed * accelRate));

      to

      GetComponent ()
      .AddForce(transform.up * (speed * accelRate));

      Could this have anything to do with my forward motion issue?

      #22927
      beezerlm
      Participant

        Ok, I got it to work somehow but I’m not sure what I did exactly. It doesn’t seem to have anything to do with the API update message though.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘I am having trouble getting my ship to move forward. When I press and hold the "W" key the ship gets just a tiny amount o…’ is closed to new replies.