I have the player automatically moving in a certain direction, and it is going too fast, so was just wondering how I can reduce this speed? Thanks
transform.Translate(0.10F, -0.055F, 0 * Time.deltaTime);
I have the player automatically moving in a certain direction, and it is going too fast, so was just wondering how I can reduce this speed? Thanks
transform.Translate(0.10F, -0.055F, 0 * Time.deltaTime);
0* anything is still 0 ![]()
change 0 to a variable called speed or something and delcare that as public in declarations like
//in declarations
float speed = 0.1f; //change this value to change speed
//in your function
transform.Translate(0.1f,-0.05f,speed*Time.deltaTime);
Using Time.deltaTime should get the Translate to change your speed. Try this:
Translate(1f * Time.deltaTime, -.5f * Time.deltaTime, speed * Time.deltaTime);
public float trio;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
if (Input.GetKey ("w")) {
transform.Translate (0 , 0 , trio*Time.deltaTime);