C#C
C#11mo ago
MENN | Kaiju

this is a script i copied from a tutorial, for some reason it doesnt work the way in the tutorial.

This script is supposed to move a 2 object to the left, which it does but it does it too quick in the tutorial the guy said that * Time.deltaTime would fix it which it didn't for me please help im confused?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PipeMovingScript : MonoBehaviour
{

    public float MoveSpeed = 5;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = transform.position + (Vector3.left * MoveSpeed) * Time.deltaTime;
    }
}
Was this page helpful?