Unity Follow Mouse Script - Help Needed!
I am currently working on a Unity project where I have to camera at an aerial view facing down to the character. I want the character to follow the mouse cursor without clicking the mouse. I cannot figure out a way to get the character to do so. Please Help!
Thank You,
gtarjohn
Thank You,
gtarjohn
Even though a lot of people here use Unity, you might be better off posting this on the Unity forums, as they are likely to have both more people and more of a focus on Unity. (as well as answers to your question being more useful to people there)
Or if you can clarify more: is it an issue with the math involved, or just how to go about scripting it in unity?
I have tried the Unity forums and nobody helped me... The problem is the script. I always have trouble with making the script to where you do not click to follow the mouse cursor.
Sincerely,
gtarjohn
Sincerely,
gtarjohn
Seems like you could just find a script where the character moves towards the click, such as the following:
http://www.unifycommunity.com/wiki/index...ck_To_Move
Then comment out the first line of the Update method:
// if(Input.GetKeyDown(KeyCode.Mouse0))
http://www.unifycommunity.com/wiki/index...ck_To_Move
Then comment out the first line of the Update method:
// if(Input.GetKeyDown(KeyCode.Mouse0))
Measure twice, cut once, curse three or four times.
Thanks for your help Matt!
Yup the same problem is with me, I always get confused in script coding , its really irritating me ! whenever i need, I will go to hire someone else !


