Esempio n. 1
0
    void OnMouseDrag()
    {
        mouseY = Input.GetAxis("Mouse Y");

        //transform.position = new Vector3(rb.position.x, Input.mousePosition.y, rb.position.z);
        //transform.Translate(transform.position.x, mouseY, transform.position.z, Space.World);
        rb.AddForce(mouseY * testing * Vector3.up);
        playPauseScript.Pause();
    }
Esempio n. 2
0
    void OnMouseDrag()
    {
        playPauseScript.Pause();
        dragging = true;
        float rot = Input.GetAxis("Mouse X");

        transform.Rotate(0.0f, -rot * dragspeed, 0.0f, Space.World);

        if (-rot > highestDragSpeed)
        {     //Keep track of the fastest speed at which the user dragged
            highestDragSpeed = -rot;
        }
    }