Beispiel #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        m_controller.UpdatePlayer();

        //axis inputs
        Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Mathf.Clamp(Input.GetAxisRaw("Vertical"), -1, 0));

        if (Input.GetKey(KeyCode.Space))
        {
            input.y = 1;
        }

        m_controller.Move(input.y);
        m_controller.Rotate(input.x);
    }
Beispiel #2
0
    // Update is called once per frame
    void FixedUpdate()
    {
        m_controller.UpdatePlayer();

        //axis inputs
        Vector2 input = new Vector2(m_joystick.Horizontal, m_joystick.Vertical);

        if (m_ollieBtn.m_pressing)
        {
            input.y = 1;
        }

        m_controller.Move(input.y);
        m_controller.Rotate(input.x);
    }