*Hey everyone!* 👏 👏 I'm happy to announce our community *Discord server* , come and *join us* : discord.gg/dac7sr2 And also, you can get all the *Sprites* and *Project Files* by supporting me on *Patreon* : www.patreon.com/CouchFerret
@peihenghuang74085 жыл бұрын
I am a Chinese university student, and I love your videos, which help me a lot about making my own games. These videos have been translated to Chinese shared on some Chinese video platforms, and almost everyone love them. Thanks a lot :)
@CouchFerretmakesGames5 жыл бұрын
I'm glad they help. :) Good luck on your games! Wow, that's soo coool! Could you give me a link or something? Or please let the translators know that I'm happy to work with them to create Chinese versions of the videos. :) Thank you!!
@peihenghuang74085 жыл бұрын
@@CouchFerretmakesGames He only translate your three videos, so I went to your channel to watch rest of them. www.bilibili.com/video/av55785086
@strobosaur4 жыл бұрын
Sir, i am in your debt. These tutorials are excellent!
@benbechia35823 жыл бұрын
Such a good turtorial man so good
@bobobobob24 жыл бұрын
Thank you! I wanted to make a Gamepad controls for my game, and this helped a lot!
@uber66043 жыл бұрын
Thank you so much!
@MrKiraBR3 жыл бұрын
Thank you soo much!!!!
@MrXRes6 жыл бұрын
Very nice :)
@user-em9su3dd9y4 жыл бұрын
Awesome!
@lvdb20063 жыл бұрын
thank you so much! Btw: this also works with ps4 controller
@narwhaale3 жыл бұрын
how do you make it go faster I need help
@Alan7422 жыл бұрын
It worked, but the controls are backwards
@SasisaPlays5 жыл бұрын
Will it work with dualshock 4? Yes it is.
@CouchFerretmakesGames5 жыл бұрын
Awesome! :)
@daleprather30264 жыл бұрын
Can you please explain why you're setting floats on your animator?
@alannahmernagh5 жыл бұрын
Nice tutorial, easy to follow. I have a question I am trying to set animation based on the position the player is moving based on a mouse click. The player will move in the direction the mouse is clicked, but the animation won't play. Are you able to tell from the code what is wrong? Thanks in advanced. void Update() { Vector2 movement = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")); if (Input.GetKeyDown(KeyCode.Mouse0)) { targetPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); } anim.SetFloat("Horizontal", movement.x); anim.SetFloat("Vertical", movement.y); anim.SetFloat("Magnitude", movement.magnitude); transform.position = Vector2.MoveTowards(transform.position, targetPosition, Time.deltaTime * 5); }
@CouchFerretmakesGames5 жыл бұрын
Hey, thanks! The problem is that the movement vector you are using gets the values from either the wasd/arrow keys or a controller. And you've said that you want a point and click based movement. So, in this case, the movement vector is always a zero vector with both x,y and magnitude as 0s. You should be calculating the actual movement of the character between the current and the last frame and use this delta movement vector for the animation parameters.
@oguz-kagan6 жыл бұрын
would it work on mobile? i mean how can i make this kind of controller for mobile
@CouchFerretmakesGames6 жыл бұрын
There are a few assets (free as well), on the asset store that gives you on screen analog stick. And if you use them for the movement vector and the fire then I think it would work. Here, Brackeys has a cool video on this: kzbin.info/www/bejne/mKGVgZx8eJ6midU
@themotherland1013 жыл бұрын
how U do this if U no wan 2 animate???
@dc52856 жыл бұрын
same for ps4 controller ? i cant get it to work .he moves for a few secs then stops
@CouchFerretmakesGames6 жыл бұрын
That's weird. It should work, maybe the mapping will be different a bit but it should work. Does it say something or just stops silently?
@dc52856 жыл бұрын
@@CouchFerretmakesGames i cant remember if it said anything. Im pretty new to this but i got incontrol now so should be ok. i moved on and making it work with mouse and keyboard now following your other video so i unfortunately cant go back to find the problem. Thanks for the instant reply tho! Much appreciated
@CouchFerretmakesGames6 жыл бұрын
You’re welcome! Yep, an asset for universal input handling is a pretty huge time saver. :)
@susmitdas5 жыл бұрын
should I skip this vid because I don't have an xbox cortroller?
@CouchFerretmakesGames5 жыл бұрын
Well it won't hurt, but you can skip it yeah. In a more recent video I made mouse and keyboard controls.
@antari80166 жыл бұрын
I do not have an Xbox joystick, how to enter a fire on the keyboard.
@CouchFerretmakesGames6 жыл бұрын
Well, then you should use the default ones that Unity creates for every project. For the movement, you can use the "Horizontal" and "Vertical" and for firing you can use the "Fire1". All of them are in the list. By default, the movement will work with the arrow keys and WASD, and fire will be left mouse click and left ctrl. However, you can change them if you want.