Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Detect mouse movement

Discussion in 'Scripting' started by RickyX, Feb 1, 2016.

  1. RickyX

    RickyX

    Joined:
    Jan 16, 2013
    Posts:
    280
    Hmmm, I cannot come up with a code to do what i want here. I'm not a begginer but i just can't figure this one out, can anyone help with the idea ? I want to detect how fast the mouse is moving and then transfer the speed to a value from 0 to 1, and then the animation of turning around will be played with the speed we got. So basically i'm trying to make the character realistically turn around when i rotate him with the mouse. What's silly is that i've came up with a code for this before and i lost it. Thanks in advance.
     
    AbhinayNegi likes this.
  2. RecursiveRuby

    RecursiveRuby

    Joined:
    Jun 5, 2013
    Posts:
    163
  3. RickyX

    RickyX

    Joined:
    Jan 16, 2013
    Posts:
    280