Log in or register to post comments

AR: Controlling a character/ 3D object using key arrows in augme

March 3, 2016 - 5:52am #1

I am pretty new to vuforia and unity, i need assistance in controlling a character or a 3d object to move using arrow keys in augmented reality. I have set up the scene, i can view the character and 3d sphere in play mode, however i am failing to use arrows to make the objects move. I have tried to add a a script to move the sphere particularly but its not working. I am very new to this kindly assist.

using UnityEngine;
using System.Collections;

public class sphere : MonoBehaviour {

	// Use this for initialization
	void Start () {
        
	
	}
	
	// Update is called once per frame
	void Update () {

      
        transform.Translate(Input.GetAxis("horizontal"), 0f,0f);
	}
}

 

Log in or register to post comments