using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ArrowMove : MonoBehaviour
{

    // Update is called once per frame
    void Update()
    {
        if (Input.GetButton("Horizontal"))
        {
            // -1 : left 
            // +1 : right 
            // 0 : left + right key down 
            Debug.Log("횡 이동 가중치 : " + Input.GetAxis("Horizontal"));
            Debug.Log("횡 이동 비가중치 : " + Input.GetAxisRaw("Horizontal"));

        }



        if (Input.GetButton("Vertical"))
        {
            // -1 : down
            // +1 : up
            Debug.Log("종 이동 가중치 : " + Input.GetAxis("Vertical"));
            Debug.Log("종 이동 비가중치 : " + Input.GetAxisRaw("Vertical"));

        }


    }
}

'UNITY' 카테고리의 다른 글

UNITY - UGUI - button , 버튼  (0) 2020.09.10
UNITY - Physic Meterial  (0) 2020.09.10
UNITY - input Manager - Key 입력 늘리기  (0) 2020.09.10
UNITY - Input Manager 값 받기 - Jump  (1) 2020.09.10
Unity - 키보드 및 마우스 입력 받기  (0) 2020.09.10
블로그 이미지

나무뚱이

,