Transform' does not contain a definition for 'Translation' and no accessible extension method 'Trans

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{

     public float playerSpeed = 10.0f ;
     public float playerRotationSpeed = 100.0f ;
   
    // Start is called before the first frame update
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
      
        float translation = Input.GetAxis("Vertical") * playerSpeed * Time.deltaTime ;
        float rotation = Input.GetAxis("Horizontal") * playerRotationSpeed * Time.deltaTime ;


       transform.Translation(0 , 0 , translation);
       transform.Rotate(0 , rotation , 0);
    }
}
1 Like

Remember, the actual error it self is pointless. Check for the key info

  • Script, Line and Column

Transform, DOES NOT contain a definition for Translation. Did you mean Translate?