I suck at coding and I’m trying to familiarize myself with the API. Personally, I would prefer that someone just show me the class(es) that allows me to do just this (in the API).A sort of, teach a man to fish sort of solution. But any solution that generates a curved path for my character would be helpful at the least. As for the code…
using UnityEngine;
using System.Collections;
public class twoDmovment : MonoBehaviour {
void Start(){}
void Update(){
if (Input.GetKey (KeyCode.W))
transform.position += new Vector3 (0.0f, 0.05f,0.0f);
if (Input.GetKey (KeyCode.A))
transform.position -= new Vector3 (0.01f, 0.0f, 0.0f);
if (Input.GetKey (KeyCode.S))
transform.position += new Vector3 (0.0f, 0.01f, 0.0f);
if (Input.GetKey (KeyCode.D))
transform.position += new Vector3 (0.01f, 0.0f, 0.0f);
}
}
Any help involving coding would be extremely appreciated too. Glancing at my code, you can possibly see i have a lot to learn about API’s and just the general languages.