27 lines
670 B
C#
27 lines
670 B
C#
using static UnityEngine.InputSystem.InputAction;
|
|
using UnityEngine;
|
|
using R3;
|
|
|
|
public class ThirdCharacterController : MonoBehaviour
|
|
{
|
|
public CharacterController characterController;
|
|
public Animator animator;
|
|
public Transform forward;
|
|
public Transform model;
|
|
|
|
public float moveSpeed = 5f;
|
|
public float turnSpeed = 10f;
|
|
public float jumpSpeed = 8f;
|
|
public float gravity = 20f;
|
|
public float minCameraDistance = 2f;
|
|
public float maxCameraDistance = 10f;
|
|
public float cameraZoomSpeed = 0.1f;
|
|
|
|
Vector2 moveInput;
|
|
|
|
public void OnMove(CallbackContext context)
|
|
{
|
|
moveInput = context.ReadValue<Vector2>();
|
|
}
|
|
}
|