I like how every-time you introduce a new function, you announce it like it's some sort of big reveal lol.
@anyshittynickname5 жыл бұрын
Since I'm a complete beginner, new functions are always a big reveal, hahaha
@celestemackaill63752 жыл бұрын
@@anyshittynickname I feel this. Started scripting in unity today. You still going?
@anyshittynickname2 жыл бұрын
@@celestemackaill6375 Yes. At the moment I'm doing audio for a game as a freelancer, so I don't have the time to work on my individual projects (First step will be finding out what game I'll do next).
@celestemackaill63752 жыл бұрын
Do you feel comfortable with things now because it sometimes feels like I will never be able to feel comfortable with unity code. Well I am a lot better than when I sent that message. But still it's feels far away.
@anyshittynickname2 жыл бұрын
@@celestemackaill6375 I went to grad school, had to do some audio coding and level design with Unity. The bulk of code was made by my classmates, but I can read variables, understand if statements and create coroutines with some skill. It's literally a language. I got rusty for lack of practice, but I got some of the fundamentals fixed in my mind, no doubt about that.
@dharmeshkumar27636 жыл бұрын
Oh i expected the same dash effect as thumbnail. But i really like the camera shaking via animation. It's amazing without writing any code.
@evanrechsteiner5186 жыл бұрын
I've wanted a proper tutorial on this for what seems like and probably is years. Your focus on simple tutorials that are easily digestible are one of the reasons I subbed. Keep it up!
@VictoriaStobbie6 жыл бұрын
I think you're my new favorite tutorial person. I've been looking for a few months for a dash tutorial. And here you are, after watching the Light tutorial.
@xdiatia41974 жыл бұрын
I went to your channel and the subscribe button was far off the screen!!!!
@VictoriaStobbie4 жыл бұрын
xDiaTia Aww cheers haha. Sorry about that 😅
@JW-uu9je5 жыл бұрын
Thank you for this Blackthorn prod! For anyone who's interested I noticed that this spawns a clone into your scene every time you use this, I created a co routine to destroy the object after 1 second has elapsed everytime you push the button: ...whatever code you have the dash effect in { ... ... Instantiate(dashEffect, transform.position, Quaternion.identity); StartCoroutine(DestroyParticleEffect()); } IEnumerator DestroyParticleEffect() { yield return new WaitForSeconds(1); Destroy(GameObject.Find("ParticleEffect(Clone)")); //the name in " " must match the name of your prefab, notice on the console how unity ads (Clone) to it }
@Bes2TheFort6 жыл бұрын
An idea for your next tutorial. Can you make a screen transition from when the player dies and comes back to life.
@floppy90536 жыл бұрын
It's now out btw
@siltoruz35024 жыл бұрын
If you guys want to make this script work side by side with your normal movement script, instead of creating a dashSpeed variable in the Dash script you need to make the normall moveSpeed variable in your Move script public, call it from the dash speed and add more velocity to it there. Also if you want this to be working on button press, you need to put the input next to the direction check: void Update() { if (direction == 0) { if(Input.GetKey(KeyCode.LeftArrow) && Input.GetKeyDown(KeyCode.Z)) { direction = 1; } This will check if LeftArrow is being pressed and dash when Z is pressed too Took me a while to figure this out but feels good :P
@bahadrdogan37343 жыл бұрын
thx man
@ishaanjuyal2122 жыл бұрын
Thanks! This was really helpful :)
@ezramin82382 жыл бұрын
thx, really helps
@Durpydogstudios2 жыл бұрын
thx
@wasdolgaming6718 Жыл бұрын
I know this video is old and this comment too but i need to say this... I do it another way... When ever you hit button left arrow or right arrow or up arrow or down arrow the PlayerMovement script is disabled, and when ever you hit W or A or S or D your PlayerMovement is enabled :)))) I call it: the Laziest way to do it...
@1206Vince6 жыл бұрын
Yessssss was waiting for this!
@tiui23716 жыл бұрын
Nice tutorials as always, I havent been programming much, but that "direction" is way more easely done by: Getting the input (vector 2); Doing an atan2 function; ( mathf.Atan2(x,y) ) (store that) And finally just apply it the way you did.
@vizion47242 жыл бұрын
I know it's an old comment but I believe that the the Atan2 function uses y before x, so like ( mathf.Atan2(y,x) ) instead of ( mathf.Atan2(x,y) ).
@tiui23712 жыл бұрын
@@vizion4724 Yeah, that makes sense, I didn't actually test the code I suggested, so you're probably right. Thanks for pointing that out!
@randomuser12493 жыл бұрын
Your never fail to make me cry I’ve been struggling on this for weeks and granted I didn’t try very hard but I had no clue ok don’t bully me
@AlexanderZotov6 жыл бұрын
You do great job!
@AlexanderZotov6 жыл бұрын
Thanks)
@beaverjoe91716 жыл бұрын
Both of you do great jobs!
@lhorbrum18186 жыл бұрын
Hello Alexander! Two of my favourite youtubers! Keep it up guys.
@bunggo99146 жыл бұрын
some 2d particle system turorials would be great! anyway, the effects you're using for making the dash moves feels alive are really cool!
@tessler97106 жыл бұрын
This video was quite awesome. Seeing that it's possible to create something beautiful without that much experience is quite motivating to do something.
@what_the_feek55686 жыл бұрын
hey bro.... big new fan of yours.... actually you are really good...you are my 2nd favorite unity developer after brackeys.... I really love your editing style...those small small animations and sketches... big way to go man... All the best and have a good day.
@reywasgrey6 жыл бұрын
Farook Shafeek if I, prefer this channel
@seamusfraser46795 жыл бұрын
I'm not sure if this is a problem on my end but this dash move doesn't seem compatible with the movement script you prescribe in your videos.
@franklimburns79385 жыл бұрын
Yeah I Know have you figured out how to make it work?
@AdirBenYair974 жыл бұрын
Doesn't work for me too :( any solutions?
@GlassChewer4 жыл бұрын
@@AdirBenYair97 use Addforce instead of velocity
@albinsamuelsson21794 жыл бұрын
@@GlassChewer doesn't work
@ElS3rna4 жыл бұрын
that is because it takes the same inputs and overlaps, I cant find how to make it work either :(
@seifmustafa20046 жыл бұрын
I just can't express how much I like you tutorials 👍👍😁💟
@Blackthornprod6 жыл бұрын
Hey Seif :) ! That's so appreciated !
@thetoastedmarshmallow16066 жыл бұрын
Is there a was to make normal movement possible but when you press... Like... Space you dash in the last direction you were facing?
@skiesquiggles73195 жыл бұрын
If you store keypresses in a temporary variable then you should be able to infer direction from that.
@starrynightchannel5 жыл бұрын
What i did was summon the last direction your character was facing using GetComponent and then in my direction 1 if statement i created an if statement with. If (otherscriptmoventright.IsFacingright) Rb.velocity =Vector2.left * dash_speed Then u can modify if going left or right
@uba7545 жыл бұрын
I am currently really struggling with this. I've got it to dash towards the mouse position but it goes to basically the exact position, not just direction. I want it to dash a set amount not a short dash because mouse is close to the player or big dash because mouse is far.
@brokenbackisbad90493 жыл бұрын
Blackthornprod to the rescue
@Oxmond4 жыл бұрын
Great tutorial idea! Dash moves are cooooool! 👍🤓
@cassdy916 жыл бұрын
Never seen anyone so excited making a unity tutorial video lol
@mogaolimpiu71904 жыл бұрын
i just started making games, and i just love your tutorials, thnank you
@derekanderson59495 жыл бұрын
Doesn't work
@MaydoFX6 жыл бұрын
Great tutorial! However, changing the direction from int to Vector2 and using Vector2.Zero instead of 0 would drastically reduce the code and make it much cleaner. Good job still :)
@howl23392 жыл бұрын
Why not use input axis for dashing?
@FanJapanStudios6 жыл бұрын
Just Shapes and Beats!!
@JackFrost-18565 жыл бұрын
What if I want to make the character dash on pressing Space while I'm moving the player around manually? Help pls
@anyskurosaky79515 жыл бұрын
If you find anything on that please let me know ! :)
@josh12345678925 жыл бұрын
@@anyskurosaky7951 this
@BikramKha1sa5 жыл бұрын
Me too need answer for this...
@adamknight45635 жыл бұрын
Hi, don't follow this tutorial on dash move, it's not good. What I do is on my PlayerMovement script, I put a line of if (Input.GeyKeyDown(KeyCode.Space)) { StartCoroutine ("DashMove"); } Then outside of your Update method, make a courotine like so: IEnumerator DashMove() { PlayerSpeed += 20; yield return new WaitForSeconds(.3f); PlayerSpeed -= 20; } Obviously you can add instantiating effects and screen shake into the sprouting as he has in this video as you please. What you're doing here is once you hit space, you are increasing your speed by 20 in this example for a third of a second (that's where the WaitForSeconds(.3f) comes in) then you will reduce your speed back to whatever you increased it by.
@angelitoc5 жыл бұрын
@@adamknight4563 Hey do you have a twitter or any sort of social media I have some questions for you
@gauravpun67496 жыл бұрын
This is very helpful ! Thanks !!
@The_Pikaboi5 жыл бұрын
i was messing around with this and it didnt seem to do anything in my platformer, just moved at the same speed.
@mirageowl5 жыл бұрын
you are probably changing velocity of the rigidbody in your normal movement as well. make sure you are running this script after your movement script takes place so that this one takes control.
@kaiser65945 жыл бұрын
same
@AdirBenYair974 жыл бұрын
@@mirageowl Thank you! that is the problem for me, but i dont know how to fix it. how would you do it?
@ze_darku_magician55044 жыл бұрын
@@mirageowl Thats exactly what i have probably done wrong. Could you maybe explain how to set the order your scripts are running?
@beautaeful4 жыл бұрын
did you find a fix for it?
@Heisenberg-xc8ub6 жыл бұрын
"Making your own games is easier than you think"
@wickedalpha98106 жыл бұрын
for anyone who is really confused on the anim controller part here is the script using System.Collections; using System.Collections.Generic; using UnityEngine; public class DashMove : MonoBehaviour { private Rigidbody2D rb; public float dashSpeed; private float dashTime; private Animator camAnim; public float startDashTime; private int direction; void Start() { rb = GetComponent(); dashTime = startDashTime; camAnim = GameObject.Find("Main Camera").GetComponent(); } // Update is called once per frame void Update() { if (direction == 0) { if (Input.GetKeyDown(KeyCode.V)) { direction = 1; } else if (Input.GetKeyDown(KeyCode.C)) { direction = 2; } } else { if (dashTime
@howl23392 жыл бұрын
GOSH YEAH
@fourty22236 жыл бұрын
Hey Noa , is there any way i could put this dashing system together with a common player controller? i tried to do it but it looks like te common player controller disables the dash system.
@Blackthornprod6 жыл бұрын
Hey :) ! Make sure you aren't using the same keys for both the dash move and the "normal" movement. For example don't get the character moving left with the left arrow AND dashing left with the left arrow. If you're using the rigidbody to get the character moving make sure that there isn't some line of code : rb.velocity = Vector2.zero constantly running. The easy fix to that is making a bool variable called isDashing for example and setting it equal to true when the character hits a dash key and set rb.velocity = vector2.zero ONLY if isDashing is equal to true :), and when that line of code as been run set isDashing back equal to false, this way vector2.zero won't constantly stop your character moving ! Hope this helps !
@SebaneseTheLebanese6 жыл бұрын
Blackthornprod hey there! can you please make a video showing how to dash like cuphead? or send me a picture of a script with what i need? please I need this for my game im submitting to hopefully get a scholarship so i can go to college
@Tealsquiddev6 жыл бұрын
@@SebaneseTheLebanese you would want to make a longer startdashtime and you want to have it at a slow-ish speed
@SebaneseTheLebanese6 жыл бұрын
@@Tealsquiddev thnxxx
@happytatertot86243 жыл бұрын
Help, I keep getting NullReferenceExeption: Object reference not set to an instance of an object. :(
@reywasgrey6 жыл бұрын
I really love your tutor 😍😍
@ibrahimbaasil97073 жыл бұрын
Very nice tutorial, code works perfectly. But I have been trying to add a cooldown to the dash so the player cant spam it. Any idea on how I can achieve this? (I'm a beginner at code btw)
@chickenfrenzy90965 жыл бұрын
How can you make it a double tap. I have movement but I want the dash and the movement.
@Gamer-uf1kl5 жыл бұрын
public int countToTwo = 0; void Update() { if (Input.GetMouseKeyDown(0) { countToTwo ++; } }
@Gamer-uf1kl5 жыл бұрын
And then continue the script like if (countToTwo == 2) { Dash(); countToTwo == 0; }
@sunnysommanek16486 жыл бұрын
great job!, i really like your video.
@1206Vince6 жыл бұрын
Is a combo system on your schedule? Like if a button is pressed once, animation 1 is playing. But when the button is pressed multiple times, the animation sequence will start
@Blackthornprod6 жыл бұрын
The combo video will DEFINITELY come up some time in the next two weeks :) !
@AgeRestrictTheInternet6 жыл бұрын
@Blackthornprod Did this video ever come out? If so, what's it called? I can't find it.
@zakihussainqureshi97936 жыл бұрын
Awesome stuff.... Keep making more please... Thank you brother
@geekscave74055 жыл бұрын
anyone knows how to make it with a double tap function?
@deadshxll4 жыл бұрын
use ur logic and u will figure it just like I did
@hxmr-kc2fh4 жыл бұрын
@@deadshxll that doesn't helps dude.
@deadshxll4 жыл бұрын
@@hxmr-kc2fh here’s what can help you, use your brain and try to write code, in the end you will figure out if you are capable of not copying and pasting code from other people. Here’s a hint to help you make the double tap function, you need to time to check in between each click, it is a bit complex but if you think of how you can build it then it should be a breeze
@thomaswalsh48823 жыл бұрын
@@deadshxll you dont have to be so rude
@beaverjoe91716 жыл бұрын
!!!!O! You REALYLY MADE IT!!!! I wished you can made on the last vedio under comment!!thanks!!!!!
@Blackthornprod6 жыл бұрын
Hey :) !! No problem, it was a great tutorial topic !
@franklimburns79385 жыл бұрын
I tried adding this to my platformer game. However it is not moving my player when I try to dash. tho I know its working because I used a Debug.Log line and that is working. But I dont know what to do to make it actually move. Some help with this would be appreciated. Thanks
@goodgamershow65053 жыл бұрын
absolutely the same problem here
@dizzyhungry3 жыл бұрын
I appreciate the tutorial This guy is way too excited lmao
@zerg2306 жыл бұрын
For some reason, Vector2.left and Vector2.right do not work(but up and down yes). Do you have a clue, why? Edit: It has to do something with being in Update(). Edit2: For some reason, rb.AddForce(Vector2.right * dashSpeed); worked.
@Demigodish4o36 жыл бұрын
Hey, I am having the same issue right now. Was it being in Update a problem? Should it be in FixedUpdate instead? Thanks! EDIT: Answered my own question! Sorry haha
@zerg2306 жыл бұрын
Glad it helped :)
@barsubata5 жыл бұрын
@@Demigodish4o3 Just changed it to FixedUpdate and it worked. Thx you both! :P
@mrfabi59434 жыл бұрын
Hm, my movement code (moveInput = Input.GetAxis("Horizontal"); //movement rb.velocity = new Vector2 (moveInput * speed, rb.velocity.y); //movement) seems to not work with that, ill try around a little bit and let you know
@mrfabi59434 жыл бұрын
Alright, so I just replaced my previous movement script with this one and it worked perfectly fine, I guess it was messing with the "rb.velocity" function. var horizontal = 0; if (Input.GetKey(KeyCode.A)) horizontal = -1; if (Input.GetKey(KeyCode.D)) horizontal += 1; transform.Translate(horizontal * speed * Time.deltaTime, 0, 0);
@LoonyJustLoony4 жыл бұрын
Спасибо за ролик, похоже я одна из русских, которая заходит на англоязычные уроки. Знаю, что вы наверное не поймёте, но все равно скажу, что ваша информация намного полнее, чем у русских видео. Your video is cool!
@mhack0710996 жыл бұрын
Dude you are the best !
@EmesZack5 жыл бұрын
As someone using Character Controller, how can i apply this dash?
@OryamBibi5 жыл бұрын
i need an answer for this too
@OryamBibi5 жыл бұрын
I have an answer just switch keys lol to something like a and q
@linshu61414 жыл бұрын
"" This Comment is from Blackthornprod from another comment. "" Hey :) ! Make sure you aren't using the same keys for both the dash move and the "normal" movement. For example don't get the character moving left with the left arrow AND dashing left with the left arrow. If you're using the rigidbody to get the character moving make sure that there isn't some line of code : rb.velocity = Vector2.zero constantly running. The easy fix to that is making a bool variable called isDashing for example and setting it equal to true when the character hits a dash key and set rb.velocity = vector2.zero ONLY if isDashing is equal to true :), and when that line of code as been run set isDashing back equal to false, this way vector2.zero won't constantly stop your character moving ! Hope this helps !
@SageNode4 жыл бұрын
didnt work. all you did was make the normal movements replaced by a dash. how do i apply this to a single Dash button in any direction?
@Skikopl4 жыл бұрын
You can do it by if(Input.GetKeyDown(KeyCode.A) && Input.GetKey("KeyCode.LeftShift")) This way if you hold A and Press Shift WHILE holding A it will dash in the direction of A if you have a playercontroller.
@kingdaygaming84614 жыл бұрын
Does this tutorial work for 3D?
@xavierwastaken68916 жыл бұрын
So the problem with instantiating a particle system every time you hit a dash button is that the particle system will not be destroyed after the particles stop playing. Anyone know an easy way to destroy the particle system object after like a second or so?
@xavierwastaken68916 жыл бұрын
If anyone is interested I did this in my script by adding the following code GameObject clone = (GameObject) Instantiate (particleSystemName, transform.position, Quaternion.identity); Destroy (clone, 1f); Essentially destroying the cloned particle system after 1 second (1f is the duration in seconds)
@johnsmith-nx9ne6 жыл бұрын
was about to reply with this very code snippet before you replied to yourself :P good job though
@cacnus5 жыл бұрын
Late, but can't you just set it to autodestroy in the new version of unity
@walteralmeida70645 жыл бұрын
This tutorial is great! many thanks! But I just wanted to know a thing. How would I do for the dash to be activated by a specific button (shift for example) AND a diretional arrow at the same time?
@marcoterlizzi73265 жыл бұрын
Use the && function. For example: if(Input.GetKeyDown(KeyCode.LeftArrow) && Input.GetButton("Shift"){ You can also create a bool which activates when you press shift. For example "bool ShiftPress = true" in that case it would be if(Input.GetKeyDown(KeyCode.LeftArrow) && ShiftPress) hope this helps :)
@walteralmeida70645 жыл бұрын
@@marcoterlizzi7326 I SEE! MANY MANY THANKS!!!
@ImD3VI2 жыл бұрын
how would this work with a topdown using rotation as well.
@human_being_who_exists49895 жыл бұрын
I know this video is old but the animation controller didn't work. I just got an error whenever I tried to use the cam shake.
@dormeod80275 жыл бұрын
If you do it in a platform game i think its better to check where the character is looking while you hit a button it can save some time in the long run
@aegresen6 жыл бұрын
Thanks for this amazing tutorial! Would you be willing to do a video on the camera shake in detail? I tried doing it but to no avail since the camera started shaking the moment I began playing the game!
@vedeopoka44956 жыл бұрын
Impressive......... keep going........
@chammi_desu5 жыл бұрын
I tried this tutorial and found that the game object does not dash a uniform distance whenever I use the ability. I can't quite tell why or if there is a pattern, but it seems random. For context, I'm trying to use this script to implement something similar to the Hollow Knight mothwing cloak mechanic. I placed two platforms within dash distance and made my cube character dash from side to side. However, after a few dashes, the object is unable to dash that distance. And another instance, the object dashed further than the platform. Anybody else facing the same issue?
@mirageowl5 жыл бұрын
this is using the update method which may run during random times in a second. using FixedUpdate may solve the issue. Detailed explanation: What this script does is move the player dashSpeed amount of units each time update is run until time between the running update and the first time the dash started becomes larger than dashTime. This means it may take 1 frame for 0.1 seconds, moving 50 units for example, or it may take 2 frames for 0.1 seconds because the engine wasn't as busy and move 100 units.
@gamefist13295 жыл бұрын
alternatively you could use a coroutine
@FrostshadowStudios03104 жыл бұрын
This'd also help if I want a character to teleport (like the Hollow Knight Dash, except instead of the character turning pitch-black, they go invisible)
@D4rkS7der6 жыл бұрын
Hey thanks for tutorial, I am new to Unity (but not programming whatsoever) and I learn a lot thanks to your tutorials. I have suggestion (or question maybe) to your code. I would find a bit more readable (or shorter? more effective?), to start direction variable from zero. All the direction vectors could be stored in private array and in if statement (dashTime
@tristancowen56366 жыл бұрын
soooo coooooool. as always, keep up the good work
@chinyonglim76246 жыл бұрын
Hi, Noa Some people using velocity like you did in this video, but there are people use 'transform.position = Vector2.Movetoward(from, to, speed)', or even using AddForce to move an object/player. Is there any good example/scenario to demonstrate the proper way of using these method?
@Blackthornprod6 жыл бұрын
Hey :) ! These are all great methods ! I would use Vector2.MoveTowards for enemy chasing AI or patrolling, but there's no real reason why you wouldn't do it hear too :) (though you would have to write more code for the same result, on the flip side you don't need a rigidbody with MoveTowards()).
@dcry10033 жыл бұрын
I didnt know you can make a camera effect using the animation *damn* also any idea how you can implement this into a UI button?
@Borgor_Eater5 ай бұрын
does anyone know how to prevent inputs while using this method so someone doesn't flip or jump during it (for a 2d side scroller)
@uba7545 жыл бұрын
How do I get the played to just dash in the mouse direction instead of these 4 directions? I have gotten it to work where it dashes to the exact mouse position but I want a set size of the dash instead and just use the mouse direction.
@melvinbengtsen69536 жыл бұрын
Just something i thought you should know, Instead of using a bunch of else if statements you could have used a switch statement like so: Switch (direction) { case 1: rb.velocity = Vector2.Left * dashspeed; break; case 2: rb.velocity = Vector2.Right * dashspeed; break; Case 3: rb.velocity = Vector2.Up * dashspeed //and so on default: Console.WriteLine("NotDashing"); break; }
@valentintyteca59256 жыл бұрын
Thanks for that tutotial ! But i wanted to ask, if i want my character to dash where i point my mouse, how do i do please?
@creationJeuxVideoETtuto3 жыл бұрын
hello....j don't understand for so complexe.... me, with 3 lines of code, dash is possible... where is the subtility that j don't know?
@hackomordy7745 жыл бұрын
Could you please tell me how to keep some time gaps between two dashes?
@feelgxxd3 жыл бұрын
im STİLL trying to find how to make cooldown in dash...
@hackomordy7743 жыл бұрын
@@feelgxxd you can use a boolean to store canDash... and use a timer script to enable and disable the canDash
@vicentezavala92743 жыл бұрын
Hey, I did it on a 2d platformer ans it works but only sometimes, like sometimes i press the dash button and nothing happens, it doesnt detect it every time, any ideas why?
@Ozetis3 жыл бұрын
i have a probleme. when i start the game, my player can't jump until i press arrows BUT the dash work only one time, when i press a other arrows, it's doesn't dash and my player can jump.
@leatherandpoemscharmyman57744 жыл бұрын
nice but how to do it for double tap an arrow keyboard for example? thx.
@Michael-The-Composer6 жыл бұрын
This is very nice!
@tymofii47183 жыл бұрын
if you want to dash in the direction the player is facing use direction = input++;
@Agent40infinity5 жыл бұрын
Honestly don't see how this is anything like Hollow Knights but cool.
@deveeyv72113 жыл бұрын
Great and simple!
@gabrielpena93076 жыл бұрын
MAN! NICE TUTORIAL !!!!! THX YOU SO MUCH
@TheBaffledZone4 жыл бұрын
The thumbnail has the crystal heart dash in it lol.
@gamefist13295 жыл бұрын
how would you make it so the dash script can work with a normal move script
@عزالدينبنعبدالرحمن5 жыл бұрын
make conditions detect both the movement button and the dash button like this : if(Input.GetKeyDown(KeyCode.LeftShift) && direction = 'D') {DoSomething();}
@rigzmoviediaries6545 жыл бұрын
Thanks again noa
@Kaasbaas12345 жыл бұрын
For me it sometimes goes further than others, i did use time.DeltaTime though so it can't be fps related :o
@Kaasbaas12345 жыл бұрын
cheers
@diegocortes78065 жыл бұрын
i just have the same issue, did you find out how to fix it?
@ARTHUR145234 жыл бұрын
Can you show the code?
@lhorbrum18186 жыл бұрын
I never thought about adding a screen shake via the animator. Does this have a major effect on performance at all? And if so, why? Thanks :)
@Blackthornprod6 жыл бұрын
Hey :) ! Nop no performance issues at all :) !
@EyesReye6 жыл бұрын
How would i make him dash diagonally?
@noellekkar9034 жыл бұрын
Change the angle
@goodgamershow65053 жыл бұрын
just use Vector2.up
@scratchgames99863 жыл бұрын
how can I make it so It calculates where the player is facing instead of the arrow keys being pressed?
@Faun4716 жыл бұрын
What if I want to replicate Hollow Knight's dash system? Dashing wherever you're facing? What shall I change?
@hackomordy7745 жыл бұрын
Use facingRight = true or false to do it....
@TheSilentNinja1376 жыл бұрын
Would this work for making a boost move?
@FutureYT4 жыл бұрын
I made a 2d platformer, and I want the player to dash when I press space in the right direction. How can I do it?
@takei54104 жыл бұрын
Can someone explain me why my dash works only when direction is equal to 1?
@creeperperson90194 жыл бұрын
this might be late but the physics dont work with the dash, the only way i could dash is if i set the rigid body to kinematic and that will stop it colliding with other objects
@turoreal4 жыл бұрын
How would you go about changing it into a switch statement?
@lituszx6 жыл бұрын
Great Tutorial that helps a lot! thx!
@gordier67873 жыл бұрын
i cant tell where anything is supposed to go because your curly brackets are arranged like a cat knocked them over
@t_hanos98345 жыл бұрын
How would you make it that you have to press another button instead of the arrow keys to dash?
@narainkarthic.n.s78353 жыл бұрын
Hi, There I followed everything as you said but when the player is dashing if he touches a corner he shoots up into the air , Can anyone help me with this
@justinaccurate3474 жыл бұрын
Instantiating the particle system doesn't work, and I did the exact same thing as him
@TookAPhatShatProduct4 жыл бұрын
Dont know if this is too late but check the Dash script attached to your character and you can attatch the prefab to make it work
@mosley34856 жыл бұрын
This code could do with a refactor. Firstly, you should never affect rb.velocity directly as it can lead to unexpected behaviour. You should use rb.AddForce to interact with a RigidBody. Also, this should be done in FixedUpdate, not Update, as you're affecting physics. There is also a lot of repetition in your huge if statement, which could be simplified. Input.GetAxis("Horizontal") gives a positive number for right input and a negative number for left input. You could handle all horizontal movement using Vector2.right and Input.GetAxis("Horizontal") as Vector2.right * dashVelocity * -1 would cause the player to move left. The same could be done for vertical movement, essentially halving the number of checks that you're performing and making the code easier to read.
@simonsvoboda88495 жыл бұрын
@Ragnarok But what if you set rb.velocity to sth else in a different script, doesn't that cancel the first one (i'm pretty sure Noa sets rb.velocity to sth else in different tutorials)
@zubbag4 жыл бұрын
Can I use this with 3D? Many thanks great vid 👍🏼
@alfiematthews38012 жыл бұрын
ive inputted the code but i dont know what key to press to actually dash
@ibrahemrafee23974 жыл бұрын
i want to make it that the dash last as the player hold the key (Like mega man type of dash) and be able to jump while the dash is active any Tips ???
@SujithEnigma777Soman3 жыл бұрын
how to dash in in south west and south east and north east and north west directions?