getaxis not working.
Help! I know this is most likely an oversight on my part... I am trying to move my rigid body sphere in game. I have completed the script yet no movement on sphere when in game mode. Can you please help educate me? I took the tutorial but the process failed. I am using Beta 5.6.0b3
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Playercontroller : MonoBehaviour { public float speed = 10.0F; public float rotationSpeed = 100.0F; void Update() { float translation = Input.GetAxis("Vertical") speed; float rotation = Input.GetAxis("Horizontal") rotationSpeed; translation = Time.deltaTime; rotation = Time.deltaTime; transform.Translate(0, 0, translation); transform.Rotate(0, rotation, 0); } }
Your answer
Follow this Question
Related Questions
GetAxis help? 1 Answer
3 lane change scripting with vertical movement problem 1 Answer
Inventory system, GetAxis actions? (complex problem) 0 Answers