You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
777 B
C#
26 lines
777 B
C#
6 months ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Autohand.Demo {
|
||
|
|
||
|
[HelpURL("https://app.gitbook.com/s/5zKO0EvOjzUDeT2aiFk3/auto-hand/controller-input")]
|
||
|
public class XRHandPlayerControllerLink : MonoBehaviour{
|
||
|
public XRHandControllerLink moveController;
|
||
|
public XRHandControllerLink turnController;
|
||
|
public AutoHandPlayer player;
|
||
|
|
||
|
[Header("Input")]
|
||
|
public Common2DAxis moveAxis;
|
||
|
public Common2DAxis turnAxis;
|
||
|
|
||
|
|
||
|
void Update(){
|
||
|
player.Move(moveController.GetAxis2D(moveAxis));
|
||
|
player.Turn(turnController.GetAxis2D(turnAxis).x);
|
||
|
}
|
||
|
void FixedUpdate(){
|
||
|
player.Move(moveController.GetAxis2D(moveAxis));
|
||
|
}
|
||
|
}
|
||
|
}
|