hi
i am new to unity and just trying out some tutorials in scripting
i am trying to move a sphere on a plane using this script
using UnityEngine;
using System.Collections;
public class playerctrl : MonoBehaviour {
void fixedupdate()
{
float movehorozantal = Input.GetAxis("Horizontal");
float movevertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(movehorozantal , 0.0f , movevertical);
rigidbody.AddForce(movement);
}
}
and its not working. I added this script to the sphere
↧