Quantcast
Channel: Answers for "How do I make my Game Object face the direction it's going?"
Browsing latest articles
Browse All 6 View Live

Answer by robertbu

Your problem is line 5. You don't want to use the 'Horizontal' axes for both translation and rotation. Line 10 handles the translation. In addition, this code should scale things by Time.deltaTime so...

View Article



Answer by VTW

First, move your var horiz and verti declarations above where your speed and rotateSpeed are. This way you won't keep instantiating a new variable every time your program updates. Instead set horiz...

View Article

Answer by MikeNewall

You need to translate in the forward direction of your characters transform. transform.Translate(transform.forward * verti * speed);

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images