Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualFlimflam

Posted 28 February 2013 - 04:27 AM

You need to define your target vector outside the scope of the function, so each time the function gets called, target doesn't get reset. Move your declaration of "target" to the same place you defined oldState, then remove the "target = mousePosition;" line.

 

Also, unrelated but in your distance checking code, you can replace "move.Equals(true)" with just "move".


#2Flimflam

Posted 28 February 2013 - 04:25 AM

You need to define your target vector outside the scope of the function, so each time the function gets called, target doesn't get reset. Move your declaration of "target" to the same place you defined oldState, then remove the "target = mousePosition;" line.


#1Flimflam

Posted 28 February 2013 - 04:24 AM

You need to define your target vector outside the scope of the function, so each time the function gets called, target doesn't get reset. Move your declaration of "target" to the same place you have oldState, then remove the "target = mousePosition;" line.


PARTNERS