if (Input.GetAxis("Vertical") > 0.2)
animation.CrossFade ("walk");
This took me a bit to figure out, in unity they setup buttons as default inputs. “Vertical” is positive when “w” is pressed and negative when “s” is pressed. You can find this in edit->project settings->input and look under vertical or horizontal. That iss not the best explanation of how it works but coupled with the unity references you should be able to figure it out.
As far as getting the run animation to work for you, I prefer a toggle or a hold button over a double click. To use a double click I’d imagine you’d need to use a counter and then use a reset for that counter which probably would require a yield which is getting much more in depth than needed.
Thanx man you really helped me wold you like to work with me on this project i just started so tell me if you want and i’ll give you the site where you can download my project.
Hmm, I do love working on projects however I currently work 50 hours a week and would only be able to work on any projects on weekends. If I may be so bold what kind of project are you working on?
First i was thinking of making game like Gothic 2 but nobody wanted to help me on it, and i don’t know a lot about animation,scripting so i was thinking something like this shooting and i don’t have some characters to make some cool game…And if you need some models tell me maybe i can get you something.
I am definitly not a modeler, I can do the coding but not the modeling.
As far as shooting a rocket, goes the easiest way is to create a rocket object, make a script that makes it go forward infinitely and after some amount of units disappear, use raycasting to detect collisions. Have a particle emitter coming out of the back of it for the smoke effect. Then when the player clicks the “fire1” button have it instantiate that prefab at the end of the gun and give it a delay so they cant go to town and fire a bazillion rockets at a time.
I have written a script for that yet but that is the gist of what you would have to do.
Have you tried the third person controller script that is in the standard assets?
That is not something I have really attempted, it all depends on how you want to handle your robots operations. You can get your mouse position and divide it by the screen size and use that for the rotation or the tracking.