DRAG & SHOOT in Unity | 2D Game Dev Tutorial

  Рет қаралды 65,079

Muddy Wolf

Muddy Wolf

Күн бұрын

Пікірлер: 216
@MuddyWolf
@MuddyWolf 5 жыл бұрын
Was this tutorial useful? Would you like more tutorials on the elements of games I make?
@Luckysury333
@Luckysury333 4 жыл бұрын
YES IT WAS SUPER USEFUL!!! Can you make a video where we can see where the ball is going to head if we pull like those dotted line in Angry Birds??
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Hmmm, yes maybe I will do a trajectory line video !
@Luckysury333
@Luckysury333 4 жыл бұрын
@@MuddyWolf I am getting ready for Ludum Dare 46 this 17th of April.....hope you will be also joining (in case if you don't know what is ludum dare, it is one of the world's largest game jams search google for more info)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
@@Luckysury333 I am this will be the first one I join. To be honest I'm not the best at game Dev! I'm trying to get better but practicing then showing off what I learn in a tutorials for others!
@utsavsingh1128
@utsavsingh1128 4 жыл бұрын
@@MuddyWolf Yes trajectory line video would be great.
@hammadmmusic
@hammadmmusic 6 ай бұрын
Absolutely nailed it! Even after 4 years, this is such a gold tutorial. You earned yourself a like and a sub
@MuddyWolf
@MuddyWolf 4 ай бұрын
Awesome, thank you!
@TurkishiOSGaming
@TurkishiOSGaming 4 жыл бұрын
You are a great teacher. You got everything; fun, educative and not boring...
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Thanks!
@CodeBlues-TimeisGold
@CodeBlues-TimeisGold 3 жыл бұрын
It's a 3D project, but we can change the z value to y value. Thank you very much for making a very useful tutorial. I wish you happiness.
@ettienneswart1719
@ettienneswart1719 2 жыл бұрын
you are a lifesaver mate
@Luckysury333
@Luckysury333 4 жыл бұрын
This is an underrated Channel for sure here you are gifted with a sub
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Thank you! I've started to put in works for future videos. A devlog will be on the channel tomorrow! :D
@craezyfx608
@craezyfx608 4 жыл бұрын
You are very underrated! This is very helpful. Thank you.
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Thank you
@barrybee4610
@barrybee4610 5 жыл бұрын
Damn dude you make awesome tutorials! Idk why you dont have more subs
@xliquid1400
@xliquid1400 4 жыл бұрын
thanks, man this video was awesome, slowly and good explained, you spoke clearly, and I could understand every word, unity tutorials should always be like this subbed :)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Woo!
@BarryConnolly-w2n
@BarryConnolly-w2n Жыл бұрын
Lovely Turtorial precise and easy to follow !!
@MuddyWolf
@MuddyWolf Жыл бұрын
Glad you liked it!
@Forestfire837
@Forestfire837 4 жыл бұрын
Didn't use the whole tutorial, but was definitely very useful with working out how the line renderer works! Looking forward to watching more of your videos :)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Awesome!
@Alex-eq2um
@Alex-eq2um 5 жыл бұрын
14:54 😂😂😂 And great video by the way, really helped with my game.
@magikalo
@magikalo 3 жыл бұрын
OMG thank you so much, i've tried to do this for 3 days and finally it's working, thank you !
@joshlim8595
@joshlim8595 4 жыл бұрын
Great tutorial! Explained really well and easy to understand
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Thanks! 🙌
@Катюша-щ5ю
@Катюша-щ5ю 2 жыл бұрын
I can't thank you enough, it works, figured the first time didn't work because I got some lines wrong
@arthur-monteath
@arthur-monteath 4 жыл бұрын
this channel is incredible
@megames4521
@megames4521 4 жыл бұрын
It's sad he didn't post for 4 months.. :/
@MuddyWolf
@MuddyWolf 4 жыл бұрын
It's coming back! I'm coming back! Woop!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
More to come soon!
@megames4521
@megames4521 4 жыл бұрын
@@MuddyWolf Nice
@mehrshadeftekhari6009
@mehrshadeftekhari6009 4 жыл бұрын
Amazing.👌 I was using it for a touch-controlled game and change a few things in there. but anyway the Explanations were really good(others won't say which code is doing what or what is this line of code we are writing is for. I mean we learn it as you do it cause u explain everything, and we are not just copying everything you type without being able to configure it for our own game later or understand it. tnx a Lot.😊
@rubikscube6771
@rubikscube6771 4 жыл бұрын
Wow, thanks. That is one of the best tutorials i have ever seen:)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Wow, thanks!
@vrmsali
@vrmsali 3 жыл бұрын
Awesome tutorial. First thing i will try tomorrow morning after my round of golf.
@mistercoder6594
@mistercoder6594 4 жыл бұрын
Exactly what i was looking for, thank you so much :)
@subharanjanghoshal5597
@subharanjanghoshal5597 3 жыл бұрын
This was definitely useful. Thanks a lot for creating this tutorial.
@AveryLiligant
@AveryLiligant 4 жыл бұрын
Thank You for this tutorial. It was very useful and well produced too :)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
You're very welcome!
@Dome31071989
@Dome31071989 4 жыл бұрын
Thank You! That's exactly what I need Greets Dominik
@MuddyWolf
@MuddyWolf 4 жыл бұрын
🙌🙌
@TheSaucerful
@TheSaucerful 4 жыл бұрын
İ have a problem; my line start from mid of the screen and lenght of line is very short. How can i locate close to the player and make it size longer?
@rapizer3427
@rapizer3427 5 жыл бұрын
This tutorial is extremely helpful thanks a million!
@MuddyWolf
@MuddyWolf 5 жыл бұрын
Happy it helped!
@abhinawram4014
@abhinawram4014 Жыл бұрын
On dragging it actually control the ball throwing force like( if mouse dragging length is short the force applied on the ball is low competitive the longer drag).
@simontriulzi3916
@simontriulzi3916 3 жыл бұрын
so i was wondering, how do you make it so you can only use it a certain amount of times when you are in the air and when you touch the ground it resets?
@iaroslavpodkovenko6118
@iaroslavpodkovenko6118 2 жыл бұрын
I've got error at 21:26 : There is no argument given that corresponds to the required formal parameter 'position' of 'LineRenderer.SetPosition(int, Vector3)'
@iaroslavpodkovenko6118
@iaroslavpodkovenko6118 2 жыл бұрын
nevermind, I've writed lr.SetPosition(points); instead of lr.SetPositions(points);
@FlimzyYT
@FlimzyYT 2 жыл бұрын
If you want to make it so you can only drag when the object is still, Then the DragNShoot script will be this: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Movement : MonoBehaviour { public float power = 10f; public Rigidbody2D rb; public Vector2 minPower; public Vector2 maxPower; TragectoryLine tl; Camera cam; Vector2 force; Vector3 startPoint; Vector3 endPoint; bool isStill = true; private void Start() { cam = Camera.main; tl = GetComponent(); } private void Update() { if (rb.velocity == new Vector2(0, 0)) { isStill = true; } else { isStill = false; } if (Input.GetMouseButtonDown(0) && isStill == true) { startPoint = cam.ScreenToWorldPoint(Input.mousePosition); startPoint.z = 15; } if (Input.GetMouseButton(0) && isStill == true) { Vector3 currentPoint = cam.ScreenToWorldPoint(Input.mousePosition); currentPoint.z = 15; tl.RenderLine(startPoint, currentPoint); } if (Input.GetMouseButtonUp(0) && isStill == true) { endPoint = cam.ScreenToWorldPoint(Input.mousePosition); endPoint.z = 15; force = new Vector2(Mathf.Clamp(startPoint.x - endPoint.x, minPower.x, maxPower.x), Mathf.Clamp(startPoint.y - endPoint.y, minPower.y, maxPower.y)); rb.AddForce(force * power, ForceMode2D.Impulse); tl.EndLine(); } } } Here I created a bolean called "isStill". And in the void Update() I made isStill = true if the velocity of the rigid body is = new Vector2(0, 0) And if its not (else), then isStill = false. And then for each if statement we made I added (&& isStill ==true) to make sure the object is still to be able to perform this action
@marvinrosales3483
@marvinrosales3483 Жыл бұрын
hi, how can i do this in 3D? what would be the code? sorry to bother you my friend.
@redtriangle920
@redtriangle920 Ай бұрын
holy shit dued, thank you
@djdee04
@djdee04 3 жыл бұрын
@muddywolfgames awesome tutorial. have just one doubt ,,,, how do i show the power when the player interacts with game. i mean at the start of the video 0:10 i can see there is a power at the top centre, how can i achieve this?
@crazy5948
@crazy5948 4 жыл бұрын
absolutely amazing exactly what i was looking for thank you
@SmashBros4339
@SmashBros4339 3 жыл бұрын
Also, anytime I drag and shoot and collide with 2 or 3 box collider platforms, the drag and shoot doesnt work. Any fix?
@organl5210
@organl5210 3 жыл бұрын
thank you so much Muddy Wolf games. This was really helpful for me!
@skamzababy6017
@skamzababy6017 4 жыл бұрын
lovely video mate
@jakeyyyyyyyy
@jakeyyyyyyyy 2 жыл бұрын
My left ear really enjoyed that one
@MuddyWolf
@MuddyWolf 2 жыл бұрын
Your left ear? 🤣
@3Fingrd
@3Fingrd Жыл бұрын
Followed the video and on finish the line renderer seems like it's attached to the ball object, so when i drag it spawns the line next to the ball rather than where I click. Did I miscode it or miss box tick in a menu or something? Either way awesome video :) thanks for putting it out
@prabinadhikari3037
@prabinadhikari3037 5 жыл бұрын
hello,how can i make the line follow the camera? so,i am making the game where the camera follow the gameobject..when ever i try and draw the line ,the startpoint moves off the camera and i dont want this to happen...i want to follow the camera like ur game which shows at beggining ..please help
@Mandrilmen_84
@Mandrilmen_84 Жыл бұрын
Hello! Thank you very much for the tutorial! I'm having issues when I set the camera to perspective mode. It only works correctly if it's in orthographic mode. Has anyone else experienced this? How can I solve it?
@VoderPoint
@VoderPoint 11 ай бұрын
everyone i know im late to the party but i need help i followed everything but unity says "The type or namespace name 'TrajectoryLine' could not be found (are you missing a using directive or an assembly reference?)" pls help me ive been stuck for two days !
@Diogo-md7rb
@Diogo-md7rb 10 ай бұрын
it's because of how the LineRenderer script is named, probably your script was not named "TrajectoryLine", try it out
@walney2008
@walney2008 4 жыл бұрын
hello, could you make an example of a game similar to ddtank, where you have the aim and strength to shoot?
@ShavDance
@ShavDance 3 жыл бұрын
Your video helped me to start developing a game that will be amazing. When I finish and upload it on steam you will get it for free.
@MuddyWolf
@MuddyWolf 3 жыл бұрын
Have fun! I'm excited to see what you create! :D
@hellclown210
@hellclown210 4 жыл бұрын
Amazing tutorial , Thank you so much !!!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Glad you enjoyed it!
@Squarerians
@Squarerians 2 жыл бұрын
i want to add cooldown for this shooting thing. please answer and tell us how we can add cooldown for this game please Cheers -your lovely followers :)
@MuddyWolf
@MuddyWolf 2 жыл бұрын
There's 2 ways you can do this! Either a by using coroutine function or by setting a boolean and setting it true after a timer, I would recommend looking into coroutines!
@Squarerians
@Squarerians 2 жыл бұрын
@@MuddyWolf i didnt understand that how can i do cooldown with using coroutine system. Can you show me one video that shows how can i add cooldown to my game using coroutine system please? I tried a lot of tutorials but they didnt work.
@GVG585
@GVG585 2 жыл бұрын
Great Tutorial! But unfortunetly it didn't work for me but you know it's okay, It was good explaining and atleast i learned alot with input, Thank you!
@zergium
@zergium 2 жыл бұрын
idk if you are gonna respond to this because it's been 2 years sience you made this video but the tutorial is great i just have an issue with it: the players can spam it and they can fly so how do i make like a cooldown system or that if the player stops moving then they can move again or something?
@section8entertainment961
@section8entertainment961 2 жыл бұрын
So what I did was create a boolean variable to track whether the player has used their drag and shoot ability or not. I wanted the player to have one chance to use the drag and shoot function and thats it. And when the player respawns it re-enables it. bool hasShot = false; if (Input.GetMouseButton(0) && !hasShot) if (Input.GetMouseButtonUp(0) && !hasShot) { hasShot = true; } Then, in my respawn Coroutine I just added hasShot = false; so for you, I would recommend doing like a Coroutine WaitForSeconds and then setting the boolean variable back to false or something of that nature.
@alexandruaioanei7457
@alexandruaioanei7457 4 жыл бұрын
Hey man, I've really liked your tutorial and it helped me a lot; but can you help me with something? After I added animation to the script the ball only jumps straight in the air, it doesn't jump on the right or left part, do you know any solution for this? Thanks in advance!
@firatsezgin1289
@firatsezgin1289 5 жыл бұрын
I am thankfull to reddit for sending me to you
@MuddyWolf
@MuddyWolf 5 жыл бұрын
Woo, I'm happy you came! I hope you enjoy your stay! 😁
@Gupatik
@Gupatik 2 жыл бұрын
I just don't understand what's the first parameter in the Mathf.Clamp( ) function and I don't get the use of it. Otherwise, everything else is clear. Thank You!
@OAAA.1
@OAAA.1 3 жыл бұрын
How to make it limited like 3 shots then its gameover
@Dubutofuuuuuu
@Dubutofuuuuuu 10 ай бұрын
where did ub get the shapes from
@karthikpoluri6372
@karthikpoluri6372 Жыл бұрын
Im getting null reference on line 39 and 49 in DragNShoot script
@jimkika
@jimkika 2 жыл бұрын
Dummy question here: I have a ball with 9 child bones( to create the soft body effect). Initially, the script applied only to the rigid body "Ball" had no effect, so I've added the same script also to each bone and it works perfectly. With that said, is there another way of doing it? Not sure if that's the most lean way. Thanks
@Mohamed_Salah_Lovers
@Mohamed_Salah_Lovers 2 жыл бұрын
Use the scripts in the middle only bone
@mr.waddles2027
@mr.waddles2027 4 жыл бұрын
Hey excellent video but I have a question How do you get the autocomplete and definition thing for unity because when I type it doesn't show all the options you have
@Isica223
@Isica223 4 жыл бұрын
Nice video! thanks, but how can i make the line attached to the ball?, if i disable use world space, still the line render where i got the mouse.
@TiimedArts
@TiimedArts 4 жыл бұрын
exactly what i was looking for
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Awesome!
@g8torx861
@g8torx861 3 жыл бұрын
When I try to add another line renderer for my player to make it so it has a trail while its moving and its not working. Does anyone know how to fix this?
@reya.9915
@reya.9915 3 жыл бұрын
Awesome tutorial!
@rubikscube6771
@rubikscube6771 4 жыл бұрын
I have a problem with the code:( Unity says no errors but when i just click without dragging it applys velocity on the y axis:( Can you/someone please help.
@FC12CGaming
@FC12CGaming 2 жыл бұрын
Thank You For The Tutorial! I Am Working On A Stickman Game And With This I Can Make It Have Unique Movement
@unscriptedlogicgames
@unscriptedlogicgames 4 жыл бұрын
Yeah it works! However, it isnt accurate for me. Any idea why?
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Hmmm, I'm not sure without seeing it
@unscriptedlogicgames
@unscriptedlogicgames 4 жыл бұрын
@@MuddyWolf To give u an idea of what i was doing, i created a "Prediction line" which basically draws an arrow in the opposite direction using the Line renderer. But when I shoot the ball, the ball's final trajectory isnt the same.
@unscriptedlogicgames
@unscriptedlogicgames 4 жыл бұрын
@@MuddyWolf In the end i resorted to the spring joint in unity. I used the spring joint for the pullback and just disabled it once it reaches the pivot point which works similarly to your video. Thanks a bunch anyway!
@SmashBros4339
@SmashBros4339 3 жыл бұрын
Great Vid! But is there a way you can drag and shoot once until you hit the ground so you won't keep shooting up in the air?
@d.r1775
@d.r1775 3 жыл бұрын
with a bool variable check if the ball is on the ground. or if collide with the boxcollider.
@orkhanhaddad1490
@orkhanhaddad1490 3 жыл бұрын
this didn't work for me and i have no idea what to do he tell me the cam doesn't exist
@overgeared2014
@overgeared2014 5 жыл бұрын
I didn't work for me, when i drag nothing happens Edit: Figured it out, for those of you who also have the same problem, change the second if statement to something like the one below if (Input.GetMouseButtonUp(0)) { endPosition = cam.ScreenToWorldPoint(Input.mousePosition); endPosition.z = 15; //sometimes the object will move even when you click so i made a new if statement //so object won't move unless you've dragged the mouse a more than 2 units if ((startPosition - endPosition).magnitude > 2f || (startPosition - endPosition).magnitude < -2f) { mforce = new Vector2(Mathf.Clamp(startPosition.x - endPosition.x, minPower.x, maxPower.x), Mathf.Clamp(startPosition.y - endPosition.y, minPower.y, maxPower.y)); rb.AddForce(mforce * power, ForceMode2D.Impulse); } }
@TiimedArts
@TiimedArts 4 жыл бұрын
What is the difference?? I have the same Problem, i exactly made it like him but it is not working for me...
@carlosbeltran2975
@carlosbeltran2975 3 жыл бұрын
Muchos thank's amigo, llevaba un buen rato dándole vueltas y no savia que hacer, hasta que puse tu código.
@johannes1791
@johannes1791 2 жыл бұрын
What if I want to check is gameObject still? (Cant shoot mid air)...
@FlimzyYT
@FlimzyYT 2 жыл бұрын
Then the DragNShoot script will be this: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Movement : MonoBehaviour { public float power = 10f; public Rigidbody2D rb; public Vector2 minPower; public Vector2 maxPower; TragectoryLine tl; Camera cam; Vector2 force; Vector3 startPoint; Vector3 endPoint; bool isStill = true; private void Start() { cam = Camera.main; tl = GetComponent(); } private void Update() { if (rb.velocity == new Vector2(0, 0)) { isStill = true; } else { isStill = false; } if (Input.GetMouseButtonDown(0) && isStill == true) { startPoint = cam.ScreenToWorldPoint(Input.mousePosition); startPoint.z = 15; } if (Input.GetMouseButton(0) && isStill == true) { Vector3 currentPoint = cam.ScreenToWorldPoint(Input.mousePosition); currentPoint.z = 15; tl.RenderLine(startPoint, currentPoint); } if (Input.GetMouseButtonUp(0) && isStill == true) { endPoint = cam.ScreenToWorldPoint(Input.mousePosition); endPoint.z = 15; force = new Vector2(Mathf.Clamp(startPoint.x - endPoint.x, minPower.x, maxPower.x), Mathf.Clamp(startPoint.y - endPoint.y, minPower.y, maxPower.y)); rb.AddForce(force * power, ForceMode2D.Impulse); tl.EndLine(); } } } Here I created a bolean called "isStill". And in the void Update() I made isStill = true if the velocity of the rigid body is = new Vector2(0, 0) And if its not (else), then isStill = false. And then for each if statement we made I added (&& isStill ==true) to make sure the object is still to be able to perform this action
@maddhi9531
@maddhi9531 3 жыл бұрын
Ive 1 to 1 followed the tutorial. The ball doesnt shoot. Help
@MatthewGruman
@MatthewGruman 3 жыл бұрын
Great video - thanks!
@hamster6039
@hamster6039 4 жыл бұрын
How could i make dots, so before shooting , i know how object would fly
@DiuNeiMeeh
@DiuNeiMeeh 5 жыл бұрын
thank you so much for the tutorial, I'm trying to make the line renderer start from ball instead of my mouse point when i drag anywhere of the screen and the line will expand the opposite way, can you pls advice.
@MuddyWolf
@MuddyWolf 5 жыл бұрын
There is a setting on the line renderer component that says use world space, if you uncheck this the line will draw from the game object! I hope this helps!
@fallendagger2766
@fallendagger2766 5 жыл бұрын
@@MuddyWolf Yes it helps
@omersatran6700
@omersatran6700 5 жыл бұрын
does it work for mobile?
@shaquilleoatmeal7412
@shaquilleoatmeal7412 4 жыл бұрын
14:54 "OHHH it's gone it's gone far and wide" 😃
@tamla9875
@tamla9875 4 жыл бұрын
Hi, how can I make trajectory line that predict the path that the object will travel? Like angry bird. Also please make a tutorial on Archery game.
@RajOnTheStreet
@RajOnTheStreet 5 жыл бұрын
Really helpful! thanks for the tutorial!
@jawka5035
@jawka5035 3 жыл бұрын
Im making bow shooting game.How i can rotate my bow in the right direction with this script?
@ezekielthemack
@ezekielthemack 4 жыл бұрын
Sit back grab your snacks - love it. LOL
@MuddyWolf
@MuddyWolf 4 жыл бұрын
😂
@DarkDragonBloody
@DarkDragonBloody 4 жыл бұрын
Nice Video man
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Appreciate it
@Jack_gav
@Jack_gav 4 жыл бұрын
Just wondering, how would I go about setting the start point to an object e.g. the ball instead of a camera point? So that my drag starts from the object, thanks so much! Great tutorial
@thebonbadoor108
@thebonbadoor108 4 жыл бұрын
You could use a raycast from mouse position and check for collision on an object by tag
@keremaslan1988
@keremaslan1988 4 жыл бұрын
How can i instantiate an object in the trajectory lines direction? Can anyone help?
@cameronmiller4958
@cameronmiller4958 4 жыл бұрын
i keep getting error code cs1061 for the drag and shoot code and i dont know how to fix it can anyone help
@giannisroumeliotis4142
@giannisroumeliotis4142 4 жыл бұрын
is there a way you can tell me how to change it instead of mousebutton to touch, for mobile uses, thank you :)
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Hi! I'll make a drag and shoot with mobile touch controls sometime today.
@giannisroumeliotis4142
@giannisroumeliotis4142 4 жыл бұрын
@@MuddyWolf great! thank you so much
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Recorded, edited, uploading be out by 2/2:30 BST today
@giannisroumeliotis4142
@giannisroumeliotis4142 4 жыл бұрын
@@MuddyWolf great! cant wait
@fallendagger2766
@fallendagger2766 5 жыл бұрын
will this work for 3D the "Drag code"? thank you
@MuddyWolf
@MuddyWolf 4 жыл бұрын
I haven't tested it to be honest!
@skeep12
@skeep12 4 жыл бұрын
with TrajectoryLine is gave an error saying It could not be found, what happened?
@vatsalbhalani4554
@vatsalbhalani4554 4 жыл бұрын
Same problem, did you find a solution?
@skeep12
@skeep12 4 жыл бұрын
Vatsal Bhalani no :( I decided to not use the line at all, It was for testing anyway
@vatsalbhalani4554
@vatsalbhalani4554 4 жыл бұрын
Oh lol;-; I'm trying to make a line for a ball game just like this tutorial, maybe I'll have to watch multiple of them to get different ways of doing it
@keremaslan1988
@keremaslan1988 4 жыл бұрын
@@vatsalbhalani4554 did you solve the problem ?
@RorschachsAsylum
@RorschachsAsylum 4 жыл бұрын
First, thank you for this awesome Tutorial!!^^ Why do you use Vector3 for startPoint and endPoint? What can be a problem with Vector2?
@Luckysury333
@Luckysury333 4 жыл бұрын
Because he wanted the line to be shown if it was Vector2 you cannot change the startPoint.z which he did in the video 11:00
@codedontwrk1132
@codedontwrk1132 5 жыл бұрын
When i drag nothing comes up what should i do??
@DayDreamer4011
@DayDreamer4011 4 жыл бұрын
Dude you've helped me so much for this upcoming game jam! Thank you so much! Sub +1
@trkkkmatmat6070
@trkkkmatmat6070 4 жыл бұрын
Why my player jump in only y axis
@simpledeck5133
@simpledeck5133 2 жыл бұрын
The script worked but the effect would only show a dot
@GameDevAnd3D
@GameDevAnd3D 3 жыл бұрын
nice tutorial, but how about on a 2d project with perspective camera?
@MohamedHassan-tp2tf
@MohamedHassan-tp2tf 5 жыл бұрын
Thank You so much
@amandixit1779
@amandixit1779 4 жыл бұрын
It's awesome ..but I really need help cause something came up and I'm really frustrated...I have made all the colliders as mentioned in the video but still, my player(ball) falls out of the area...Meaning no collision...Please if anyone has the solution for this please do help.....
@unityalexdev
@unityalexdev 3 жыл бұрын
check the Z transform
@Muthugaming843
@Muthugaming843 4 жыл бұрын
Hey bruh how to do you learn unity can you share somethings to us......................
@MuddyWolf
@MuddyWolf 4 жыл бұрын
I just read the documentation! It's really useful!
@mahmoudshalabi8613
@mahmoudshalabi8613 4 жыл бұрын
Hey! Could this be used in 3d
@donutbedum9837
@donutbedum9837 4 жыл бұрын
Bro hell yeah this was useful. This is like the first thing I've ever done that works. Definitely subbing and watching your other videos. Can we have the source code? Thx!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Awesome, thank you!
@alexrizzo__93
@alexrizzo__93 4 жыл бұрын
Thank you!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
You're welcome!
@aceadamgaming405
@aceadamgaming405 4 жыл бұрын
When I drag it does nothing!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Hmmm, I am not sure why this is happening maybe if you share the script with me I could figure it out :)
@aceadamgaming405
@aceadamgaming405 4 жыл бұрын
Muddy Wolf uhhh, well I found another tutorial and that seemed to make it work (the tutorial was made by octomanx) however, now that I have ur attention, I was wondering how to make a health system where each time an object hits you it has a chance of reducing health/reduces health? I’ve been spending a lot of time looking for a tutorial and I have no clue how to do it!
@MuddyWolf
@MuddyWolf 4 жыл бұрын
Odd, I was just making a health system but not by chance? Maybe you could use Random.Range(0, 1) and check if it is 1 and if it is 1 then take damage? That means you'd have a 50% chance to take damage! If this isn't useful then email me using my contact form on my website tylerpotts.co.uk/ and I'll help you fix it! :D
@farestutorials6425
@farestutorials6425 3 жыл бұрын
Force = Vector2(Mathf.Clamp(startPoint.x - endPoint.x, minPower.x, maxPower.x), Mathf.Clamp(startPoint.y - endPoint.y, minPower.y, maxPower.y));, this is and error it says u cant use VEctor 2 like a method.
@jakublaszczyk1404
@jakublaszczyk1404 3 жыл бұрын
use "new Vector2(...code here)"
@greengamer2065
@greengamer2065 4 жыл бұрын
it not showing ridgidbody in code
@keremaslan1988
@keremaslan1988 4 жыл бұрын
My trajectory line doesnt work can someone help please?
@xteclisx27
@xteclisx27 4 жыл бұрын
Gotta expound a bit my dude.
@bitmodelstudio
@bitmodelstudio 4 жыл бұрын
how can i prevent multiple jumps?
@clumsycaden5708
@clumsycaden5708 4 жыл бұрын
yeah, make a boolean thats called in air. If it is in the air change the boolean to true. Make an if statement "if (boolean) is true" and pause the movement when its true
@bitmodelstudio
@bitmodelstudio 4 жыл бұрын
@@clumsycaden5708 thx. i fixed already. 👍😀
@clumsycaden5708
@clumsycaden5708 4 жыл бұрын
@@bitmodelstudio oh ok, I thought so since you commented 2 weeks ago
@miuni824
@miuni824 4 жыл бұрын
can i get your desktop wallpaper please?
@MuddyWolf
@MuddyWolf 4 жыл бұрын
I don't have it anymore and don't remember where I got it from... Sorry!
@phantombox4391
@phantombox4391 5 жыл бұрын
Nice Tutorial, we use similar functionalities in our game Rise Of Horizon. If you like, you can watch it on our channel and tell us what you think.
@MuddyWolf
@MuddyWolf 5 жыл бұрын
Ooo yes please! I'll check it out tonight!
@КУМАР-я4э
@КУМАР-я4э Жыл бұрын
Неверно рассчитывается вектор импульса (46 строка)
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
10 Unity Tips You (Probably) Didn't Know About
6:47
Sasquatch B Studios
Рет қаралды 50 М.
How to show a drag line - [ Unity Tutorial ]
5:23
Danny Makes Stuff
Рет қаралды 25 М.
The BEST Mechanical Display You've EVER Seen!!!
13:51
Tin Foil Hat
Рет қаралды 595 М.
How to make a 2D Bow and Arrow with UNITY & C#!
15:02
Blackthornprod
Рет қаралды 94 М.
I rewrote my dungeon generator!
4:27
UnitOfTime
Рет қаралды 170 М.
How to make AI Turret Bots in UNITY - 2D
14:59
The Game Guy
Рет қаралды 27 М.