예제 #1
0
    void GetDir()
    {
        Vector3 CamF = new Vector3(playerstat.GetCamera().transform.forward.x, 0, playerstat.GetCamera().transform.forward.z);
        Vector3 CamR = new Vector3(playerstat.GetCamera().transform.right.x, 0, playerstat.GetCamera().transform.right.z);


        movedir.x = playerin.horizontalAxis;
        movedir.z = playerin.verticalAxis;

        movedir = (CamR * Input.GetAxis("Horizontal") + CamF * Input.GetAxis("Vertical")) * planespeed;
    }