Hello internet,
I need assistance debugging some code I am trying to write. Listed below is code I am writing.
Note: I am trying to write player movement for an android phone, what you see listed may not reflect the proper terms for the phone.
using System.Collections;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Input.GetAxis(“Horizontal”);
Vector3 pos = transform.position;
pos.x = 2f;
transform.positon = pos;
}
}
Errors I receive are as follows;
- Assets\Scripts\PlayerMovement.cs(19,19): error CS1061: ‘Transform’ does not contain a definition for ‘positon’ and no accessible extension method ‘positon’ accepting a first argument of type ‘Transform’ could be found (are you missing a using directive or an assembly reference?)
Thank you!