Hi, im trying to integrate the Leap into unity for an endless running game that i made. It works well with the keyboard as a controller, but i would like to implement the Leap, the controls are very simple, only left and right and the player automatically moves forward. The keyboard version is ready and ive got Unity to recognise the Leap. I would now like to make my player object (a spaceship) to move left when i move my hand left and move right when i move my hand right.
Right now i use this for movement with the keyboard controller:
moveDirection = Vector3(Input.GetAxis("Horizontal")5, 0, 400Time.deltaTime);
moveDirection *= speed;
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
Will i need to attach a "Hand Controller" prefab to the spaceship, so it moves forward with it? and how do i translate the hand movements into the movements of the spaceship?
It would be great if you could give me some advise or suggestions.
Thank you very much,
Sid