- Home /
 
 
               Question by 
               Dallen789 · May 08, 2018 at 11:37 PM · 
                movementmousenavmeshagent  
              
 
              Make a character follow mouse when button is held down
I am trying to make a game where the character follows your mouse as you hold the button down. Kind of like Diablo. The only difference is I check to see if the mouse clicked an interactable object first and if not then follow the mouse. It goes to the click position just fine but if I hold down the button the character just keeps getting slower and slower until it just stops moving. I have tried multiple solutions from others who have asked this question, but i think since i am checking for an interactable first, none of them have worked. Any one know a solution to this or a better way to write this.

 
                 
                movementquestion-01.png 
                (41.1 kB) 
               
 
                
                 
                movementquestion-02.png 
                (51.4 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by rodrybest · May 09, 2018 at 01:46 PM
Watch this video and you will understand how Lerp actually works.
Your answer