I created the PERFECT grappling hook... and you can too! UNITY 2D

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 474

  • @sharkycat1096
    @sharkycat1096 3 роки тому +116

    Ok I finally fixed an issue and I’ll share here: for those of you where the rope isn’t pulling the character YOU HAVE TO TYPE IN THE VALUES IN THE ANIMATION CURVE!!! right click and press edit key and on the first one put 0 in the top and 0 on the bottom and on the second put 1 in the top and 0 on the bottom I was struggling for like 2 hours

    • @PhilDeveloper
      @PhilDeveloper 3 роки тому

      Thank you so much!!!

    • @blakembishop
      @blakembishop 3 роки тому

      Thank you as well.

    • @sinetwo
      @sinetwo 3 роки тому

      Jeez thanks you SO much man. You saved me A LOT of time here.

    • @mrstickboy7516
      @mrstickboy7516 2 роки тому +1

      Thank you SO much!!!!

    • @cowosome
      @cowosome 2 роки тому +1

      Where do I need to right click?

  • @niracaldwell
    @niracaldwell 4 роки тому +81

    This isn't one minute unity.
    This is 10 episodes of 1 minute unity!

  • @meehaw11
    @meehaw11 3 роки тому +82

    Now that you clarified this video isn't going to be 1 minute long you didn't have to make the video 2x speed so I could actually understand something

    • @sae7561
      @sae7561 3 роки тому +16

      Don't want to sound like a asshole, he's code helped a lot but I have no idea why he is going Mach 1

    • @talion9289
      @talion9289 3 роки тому

      @BluMiester then he sounds super glitchy and low pitched

    • @dcry1003
      @dcry1003 2 роки тому +2

      guys theres a playback speed for a reason

    • @palvelusmusic
      @palvelusmusic 2 роки тому +3

      am i right? can't understand sht. he's going too fast

    • @bruhdupfish4386
      @bruhdupfish4386 2 роки тому

      exactly he is way too fast

  • @Crackpotweevil1
    @Crackpotweevil1 3 роки тому +47

    For a rookie programmer there is so much good stuff in here that's super valuable to know. I think a lot of this can be applied on more than just a Grappling Hook. This tutorial is already awesome, but If you could slow it down and take a bit more time to walk through some things it would be amazing. I had to watch this at 0.75 speed just to kind of understand what's happening.

  • @jasonblackford3678
    @jasonblackford3678 4 роки тому +12

    Thank you for sharing this. You are very kind to do so :) I've spent a few hours trying to figure out how to use the line renderer for this type of animation specifically. This is a huge timesaver! Thanks for teaching me something new.

    • @1minuteunity759
      @1minuteunity759  4 роки тому +1

      Happy to help

    • @trustworthyally2275
      @trustworthyally2275 2 роки тому

      @@1minuteunity759 Hi, if I would like to fire the grappling hook and it misses, how would I go about showing that to the player? Currently it does nothing for that.

  • @Javimollolla
    @Javimollolla 4 роки тому +25

    There is a common problem that I had and that I have seen in the comments that more people do, that is the player attaches to itself and nowhere else, I managed to fix it.
    Follow the video as he does but have in mind two things:
    1- When he says the points in the animation have to be at (0,0) and (1,0) and (0,0) and (1,1) this is important, dont do it by hand, right click on the points, click on edit key and put exactly 1 or 0.
    2-I think that the main problems why it attaches itself is because the first object that it finds when you click somewhere is itself, so the layers matter! On Inspector change the layer of the player (on the top right) to default and select to change the children too, and then go to grappling gun and change the layer of this one and only this one to a different layer, layer 2 works for me. This works for me with the box "grapple to all" ticked, but you can also try it if you untick the "Grapple to all" and just select grapple to the layer where the rectangles are. I would suggest you play with this until it works for you :)

    • @jmun3688
      @jmun3688 4 роки тому

      I've been trying to get this to work for awhile, thanks!
      Edit: Just got it to work

    • @modiville
      @modiville 3 роки тому +1

      @Matus Kordos I have the same problem, f i get it to work i will let you know

    • @modiville
      @modiville 3 роки тому

      @Matus Kordos What did you do to fix it?

    • @PopMusicKiller
      @PopMusicKiller 3 роки тому

      Yep this code is very sensitive to how layers are configured.

    • @axeonee
      @axeonee 3 роки тому +1

      i have tried what you said now my player doesn't get dragged with the grappling hook, no animation and the place from where the line goes somehow moves up. Weirdly enough this only happens on ignore raycast(second layer) layer. If i move it to another it doesn't grapple hook at all.

  • @jacktjong1266
    @jacktjong1266 4 роки тому +4

    Nice, finally a resource where I can check how a hookshot's physics should work!

  • @ccSalman
    @ccSalman 2 роки тому +3

    Alright, *1 minute unity, please pin this.* so sharkycat109 tried to fix the issue. But he just missed one point. Let's go ahead and do it step by step!
    1. First of all, once you enter the script and apply everything, just left click on the animation curve, and once you do that, right click on the beginning of that green line and click "edit key".
    2. Once you click edit key, put the value (the bottom) to 0. You don't need to do anything with the above text box. And then click ENTER. Do the same with the end of the green line! Right click, click edit key and put the value to 0.
    3. By the way, if your grapple isn't showing (it's invisible) then that means you didn't choose the right Material. Just play around with the types of materials you can do for example Unlit or you can also do Lit.
    4. Let's get to the actual animation. Instead of right clicking on the beginning or end of the green line, just right click anywhere on the green line and click "add key" this will create some sort of point. You can drag the point to where you want it and then just add more points to create more curves in order to create the animation.
    5. Well, you're basically done at this point. You actually don't need to do ANYTHING with the second animation curve because that will just straighten the line.
    6. Also, go to the grappling gun and go to its script. You can choose alot of options you can play around with! For example, launch to point will, well... launch you to the point where the grappler is headed! If you turn it off, it won't let you go to the point, it will just let you hang there. That's good for swinging and stuff. If your grappler isn't letting the player rotate once it's grappled, turn ON rotate over time (I think.) Again, you can play around with the check boxes and stuff for the grappling gun script.
    7. You're done!

    • @4xomg
      @4xomg Місяць тому

      sorry i didnt get it where should i click a sorry but im beginer

  • @sandex6811
    @sandex6811 2 роки тому +1

    Ok so the code is very delicate, and if you cant get the thing to work, all you gotta do is change the launch type to Transform Launch and it worked for me.

  • @robelso5646
    @robelso5646 2 роки тому +1

    This is so sick! Thanks for the super amazing tutorial!!!

  • @Geoeg
    @Geoeg 4 роки тому +20

    That's way too fast and hard to follow and the editing is making it more dificult to watch , keep it simple

  • @DavidDC
    @DavidDC 6 місяців тому

    Problems you probably have too:
    1. If your rope keeps sticking to nothing, your firing point is ON the "gun barrel" and is sticking to it.
    2. If the rope is not pulling your player make sure "Rope animation curve" starts at (0,0) and ends at (1,0) and try different shapes. I had to use one of the predefined shapes and then reshape it in order to work.

  • @siltoruz3502
    @siltoruz3502 4 роки тому +3

    Awesome tutorial! Thnx for sharing.

  • @epicdayman6200
    @epicdayman6200 3 роки тому

    Finally I found it- hook, that I need. U r the best, bro. The best

  • @banadoraa7954
    @banadoraa7954 4 роки тому +1

    PERFECT VIDEO! Tysm for giving code and not wasting anyones time with bs. You got a new subscriber🔥🔥👍🏾

    • @CrAzYpotpie
      @CrAzYpotpie Рік тому +2

      Learning to code is never a waste of time if you want to achieve greatness.

  • @axera1762
    @axera1762 4 роки тому +4

    Keep going with things like this

  • @Zteam1Brawlstars
    @Zteam1Brawlstars 4 роки тому +3

    Thank you so much you actually took feedback from us viewers. So here i ask dor another thing. Can you give a turtorial for a enemy tracking ai(like a flying enemy that goes around the environment to the player)

    • @Zteam1Brawlstars
      @Zteam1Brawlstars 4 роки тому

      I just realized you dont even have 1k subs. Bruh your videos are so good

    • @1minuteunity759
      @1minuteunity759  4 роки тому +1

      Next video is AI themed... Don't tell anyone (Well, not about flying things but be sure it will be cool😎)

    • @Zteam1Brawlstars
      @Zteam1Brawlstars 4 роки тому

      @@1minuteunity759 yayyyyy

  • @doctorsuper
    @doctorsuper 2 роки тому +1

    Great tutorial bro! Helped a lot!

  • @MiddleChildYT
    @MiddleChildYT 6 місяців тому +1

    man, my man keeps going into the walls.. anyone know how to fix this?

  • @nishitjha9526
    @nishitjha9526 4 роки тому +10

    You're amazing bro.But can you go only a bit slow?cause i am a noob and have to follow at 0.5 :D

  • @interstellar1798
    @interstellar1798 4 роки тому

    Thank you for making this video. Very helpful

  • @ChetanSaini420
    @ChetanSaini420 4 роки тому

    i was just waiting for this Subbed bro!!!!!

  • @TRDRHDB
    @TRDRHDB Рік тому +1

    I understand it's like... the whole brand, but even having it on .25 speed is almost too damn fast to keep up with i have to go frame by frame to see what to do next. Good video though (so far still not done following it)

  • @sinetwo
    @sinetwo 3 роки тому

    This looks fantastic! Can't wait to try this out

  • @zaidkiwan5168
    @zaidkiwan5168 4 роки тому +20

    please. just for the love of everything SLOW THE FFFFF DOWN!!!!!!!!!

    • @hxmr-kc2fh
      @hxmr-kc2fh 4 роки тому +4

      yeah :(

    • @elliotrudkin4853
      @elliotrudkin4853 3 роки тому +2

      i had to watch it at 0.75 speed

    • @FruitLoops_
      @FruitLoops_ 3 роки тому

      @@elliotrudkin4853 sometimes i pulled it down to 0.25 to understand what he was doing ;-;

    • @IyaB
      @IyaB 3 роки тому +1

      @@elliotrudkin4853 I had to watch at 0.5 speed 😂

    • @axeonee
      @axeonee 3 роки тому

      better than stay 30 minutes for information that can be said in 1 minute

  • @allenisom3247
    @allenisom3247 3 роки тому +1

    If this had a wrap and unwrap on the rope when it collided with surfaces, it would be absolutely perfect!

  • @Der1217
    @Der1217 2 роки тому

    Thank you for this, I was struggling with the rope cuz it pushes me back when I launch it but I just had to adjust my firepoint position so it finally worked out lol

  • @billy1610
    @billy1610 3 роки тому

    Thank you so much for making this tutorial!!

  • @Vris754
    @Vris754 4 роки тому +3

    my grappling gun works but it only shoots kind of like on me i guess? i need help to fix it cuz the gun doesnt shoot to the object it shoots and sticks on me i can spin areound the pivot of the rope but it doesnt go to my platforms

  • @rise8766
    @rise8766 4 роки тому

    man i love u, the best channel in this world

  • @victora203
    @victora203 4 роки тому +2

    You have waaaaaaay too little subs man. This is CONTENT. I hope you grow soon!

    • @1minuteunity759
      @1minuteunity759  4 роки тому +2

      Thanks man, really appreciate it!

    • @victora203
      @victora203 4 роки тому +1

      ​@@1minuteunity759 Hey, my rope doesn't travel to where i click with my mouse, it just spawns and ends at my firepoint. The rope animation is set from 0,0 to 1,1. Im not sure why this happens
      EDIT: "Cannot create the 2D joint on 'PLayer because it connects to itself"

    • @1minuteunity759
      @1minuteunity759  4 роки тому +1

      @@victora203 Well that's interesting. Is what you've typed an error?
      Really weird my dude.
      Have you followed the tutorial exactly like me? or have you tried to implement your own things?
      hmu with an answer, currently on vacation, so I'll not be able to test things myself.

    • @victora203
      @victora203 4 роки тому

      @@1minuteunity759 I'm sure i personally made a mistake. Totally understandable, enjoy your vacation. I will figure it out tomorrow. I'm just aprecciating that you want to help so much :D

    • @victora203
      @victora203 4 роки тому

      @@1minuteunity759 Hey again. I tried doing the tutorial over again, and now the last problem isn't here anymore. I have some things i need to fix tho. 1. I can only see my rope if i remove my backgrounds. 2. When i launch my rope it doesn't straighten out and 3. I dont hang in my rope. I just fall infinetely. (i chose auto configure distance)
      Do you have any ideas on what i could check to fix this? I dont get any errors in my console.

  • @omle8492
    @omle8492 2 роки тому

    Damn this guys smart. Spent half a day trying to make a grappling gun and nothing worked lol

  • @ctehuey
    @ctehuey 3 роки тому +4

    Hey to those who's grappling gun won't travel at all.
    Here is an alternate way to SetGrapplePoint() {
    RaycastHit2D _hit = Physics2D.Raycast(firePoint.position, (m_camera.ScreenToWorldPoint(Input.mousePosition) - gunPivot.position).normalized, maxDistnace, _groundLayer);
    Debug.DrawRay(firePoint.position, ((m_camera.ScreenToWorldPoint(Input.mousePosition) - gunPivot.position).normalized * maxDistnace), Color.red, maxDistnace);
    if (_hit)
    {
    Debug.Log("hit");
    grapplePoint = _hit.point;
    grappleDistanceVector = grapplePoint - (Vector2)gunPivot.position;
    grappleRope.enabled = true;
    }
    }
    I'd recommend giving this a try if your grapple gun isn't going anywhere. Note that the Debug.DrawRay will create red line on your screen so don't be alarmed.
    I'm no expert but hope this can help someone.

    • @IamDaveDev
      @IamDaveDev 3 роки тому

      YOU ARE A LIFE SAVER!!!

    • @solomonlyons10
      @solomonlyons10 2 роки тому +1

      where did you get _groundLayer from? Im getting an error because of it

    • @jimmyjones3200
      @jimmyjones3200 2 роки тому

      You freaking Ledge!! thanks pal!

    • @jimmyjones3200
      @jimmyjones3200 2 роки тому +1

      @@solomonlyons10 If this is still a problem, just change it to the "grappableLayerNumber"

  • @arievix8744
    @arievix8744 3 роки тому +2

    Can you do how to make grapple points so like certain spots in ur map that you can grapple?

    • @hassanmaswedish2290
      @hassanmaswedish2290 3 роки тому

      He had a layer thing in the line script
      Add the things u want to be grappable to the layer!

  • @marcus4298
    @marcus4298 4 роки тому +1

    You think you could do a video on how to reverse the animation of the rope to go back into the gun when you let go of the mouse? Great vid btw

  • @ariaedi7
    @ariaedi7 3 роки тому +1

    Hey, awesome tut, any advice on how to add a little 2d hook sprite on the end of the rope?

    • @willylliw7
      @willylliw7 2 роки тому

      I want to do the same, you find finally could make It?

  • @progCan
    @progCan Рік тому

    *AMAZING and i am planning to use this in my commercial game, so should i credit you or you know, at least can i even use it?*

  • @Il0vew0nt0ns
    @Il0vew0nt0ns 5 місяців тому +1

    i had a problem with the line not rendering, does anybody know how to fix this?

  • @ankitpatel0101
    @ankitpatel0101 4 роки тому

    Thank for the amazing tutorial for grappling hook

  • @faisalk252
    @faisalk252 4 роки тому +2

    How do you not have more subs, the unsolved mystery of youtube...

    • @godot-boy7694
      @godot-boy7694 4 роки тому

      He's good but his channel only had few videos, That's the reason for fewer subs.

  • @bluetorch4166
    @bluetorch4166 3 роки тому +2

    if you can't find universal render pipeline in unity 2020 you need to download from package manager

  • @berkcan3475
    @berkcan3475 3 роки тому

    Dude ure legend, imo you should put this to store as a slap of faces of some putting plugin with 5 bucks

    • @TornSilencio
      @TornSilencio 3 роки тому

      it works fully for you? for some reason the rope doesnt shoot out for me it just sticks to the original area the Grappling gun is when you left click. It also doesnt work unless I check Grapple to All.

  • @Bruno-mq5ss
    @Bruno-mq5ss 4 роки тому +2

    I found an Issue, the animation and all is perfect but the spring joint of my player is not currently activating whenever I want my character launch where the rope is, I´m using the Rigidbody type of launch and thats all, also thanks for this good tutorial keep going

    • @1minuteunity759
      @1minuteunity759  4 роки тому +1

      Is the last value of the rope progression curve at exactly (1,1)?

    • @Bruno-mq5ss
      @Bruno-mq5ss 4 роки тому +3

      Yes it is the firs wave is 0,0 to 1,0 and the last is 0,0 and finally 1,1, but my question is if the launch is in physics options did the Spring Joint have to like enable or something? if you have any answer please let me know, also thanks for the answer speed, if you keep doing it you will be a super indie dev channel

  • @JRebYT
    @JRebYT 3 роки тому +3

    @1 Minute Unity can you get us a full project download? I think something is wrong with the grapping gun script, as it shoots to player himself or sticks to the background. I see many people with the same problem. I went over your tutorial 2 times, did precisely what you showed, but I always end up with the same result.

    • @TornSilencio
      @TornSilencio 3 роки тому

      did you figure it out? its like the rope shoots toward my players head slightly then retracts back and sticks to the original firing point. its all in a split second

    • @JRebYT
      @JRebYT 3 роки тому +1

      @@TornSilencio Nah, sadly was not able to. I abandoned the project after trying hard. Couldnt figure it out :/

    • @TornSilencio
      @TornSilencio 3 роки тому

      @@JRebYT its ok thank you! I'm really disappointed in this tutorial...been trying to figure out whats wrong for almost a week now

    • @TornSilencio
      @TornSilencio 3 роки тому

      @@JRebYT *update omfg I think I figured it out...it pulls in really fast which i need to fix but its actually working.

    • @bananaboy2206
      @bananaboy2206 2 роки тому

      @@TornSilencio how did you fix it?

  • @PhilDeveloper
    @PhilDeveloper 3 роки тому +1

    Really great tutorial and still works to this date! I have a small problem however where when I grapple into a wall about 1 in 25 times I glitch into the wall. to try and fix this I set all rigidbodys to continuos but the problem still occurs. do you know a fix?

    • @blekcode1416
      @blekcode1416 3 роки тому +1

      did It really work for you? I tried it in the newest long term support 2019 version, I really did exactly what he said in a completely new gamefile. But when I shoot the rope comes out (not even from the firepoint) and then nothing happens. do you maybe know what I did wrong?

    • @PhilDeveloper
      @PhilDeveloper 3 роки тому

      @@blekcode1416 make sure the animation graph starts at exactly 0 and ends at exactly 1

    • @blekcode1416
      @blekcode1416 3 роки тому

      @@PhilDeveloper omg im so dumb.... had it on 1,0 and not 0,0 I thought the like straight one to select was already the correct one... thanks ! Was really confused because didnt thought that the animation can destroy everything

    • @muadhk
      @muadhk 3 роки тому

      What do you attach the spring joint 2d to, console keeps throwing errors saying that my spring join is attached to itself!

  • @HarrisonK08
    @HarrisonK08 2 роки тому

    Hey man this is a really good vid and very helpful , however the "gravity" when acc hooked to something is reallly slow and it takes ages to get back down to the middle, can you help? Its for a game jam so a reply asap would be nice

    • @HarrisonK08
      @HarrisonK08 2 роки тому

      LIke for the auto configure distance it doesnt fall or move towards underneath the grapple point, it just kind of floats there

  • @ZetsuCl
    @ZetsuCl 3 роки тому +2

    Doesn't work with me, the tutorial is too quick and the edition make it difficult to understand

    • @IyaB
      @IyaB 3 роки тому

      Agreed

  • @chasekerr4580
    @chasekerr4580 Рік тому +1

    I can get the grappling hook to shoot and latch onto an object. But it doesn't pull the player at all. I have manually entered the (0,0) (1,0) into the animation curve and launch speed curves. And I've messed with the layers and launch type. Any other ideas on how to get it working?

    • @chasekerr4580
      @chasekerr4580 Рік тому

      If the auto configure distance is turned on on the springJoint2d the physics launch won't work. That turned out to be my issue

  • @sabermade
    @sabermade 3 роки тому

    Hey, I love your Tutorial man. It helped me a lot with my game. But I am creating a mobile game and right now you have to rotate the grappling gun to the right angle in order to shoot where u point at. That makes a lot of sense for a PC game but on mobile you would have to touch the screen once to rotate and another time to actually shoot. I tried to change parts of the script in order to kind of rotate and shoot at the same time or to even remove the FirePoint completely but it doesn't really work the way I want it to. Do you maybe know a way to achieve my plans? You seem to be extremely talented with Unity. Thank you.

  • @Calico983
    @Calico983 4 роки тому +1

    I am getting same problem as some other people, it'll only grapple a few feet and stick to background. I figured out the issue is in the SetGrapplePoint() method, something to do with Raycast most likely, as i have no idea how to use that yet. I used debug log to see that where i was clicking was not being accurately brought back to the variable 'grapplePoint'. Not sure why, but perhaps the code is overcomplicated in those lines, like its detecting obstruction's to the click point when there is none, or it's simply miscalculating the click point. Please let me know if you can fix this, because it looks great! Just has a few kinks. Like others, I'm using different sprites than you, so it's possible colliders are causing issues due to sprite sizes, but that shouldn't be it.

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      What layer are you trying to grapple to?

    • @Calico983
      @Calico983 4 роки тому

      @@1minuteunity759 It only seems to shoot a grapple if i check the box 'grapple to all', whereas if i choose to grapple to a specific layer the line doesn't shoot out. Hmmm

    • @Calico983
      @Calico983 4 роки тому

      @@1minuteunity759 I got it working for a second, but I'm sure it'll have issues such as now it won't grapple to specific layer or look for max distance, but luckily the RaycastHit method can use those as parameters. All i did was these 4 lines at beginning of SetGrapplePoint()
      Ray ray = m_camera.ScreenPointToRay(Input.mousePosition);
      RaycastHit2D hit = Physics2D.Raycast(ray.origin,ray.direction);
      if(hit.collider != null){
      grapplePosition = hit.point;
      }
      the rest of the code is the same except i take out when you set the grappling point. This does work to connect me to only objects with a 2d collider now, as before it would shoot a fixed distance into space and attach to air.

    • @hassanmaswedish2290
      @hassanmaswedish2290 2 роки тому

      @@Calico983 hey did you find a solution? If so could you please tell me, I’m also stuck at this exact same problem

    • @lindsayjarvis7292
      @lindsayjarvis7292 7 місяців тому

      make sure you move the fire point transform from 0,0,0 otherwise it just sticks to the player. Mines set to 0.1, 0,0 and works fine

  • @ultimate88x
    @ultimate88x 2 роки тому

    Everything works just fine but I have an issue, why can't I see the animation?

  • @PopMusicKiller
    @PopMusicKiller 3 роки тому +1

    Any chance you could upload the complete project for reference?

  • @mudumbiarun9595
    @mudumbiarun9595 3 роки тому

    thanks for timely tutorial please make existing hypercasual games mechanics

  • @drawingdisciple2851
    @drawingdisciple2851 3 роки тому +2

    I did it but the rope doesn’t leave the grappling gun.it is just stuck in the gun or is a dot on the screen.

    • @TornSilencio
      @TornSilencio 3 роки тому +1

      did you figure it out? i have the same problem

  • @gdsaurmanex8804
    @gdsaurmanex8804 3 роки тому +1

    I've got everything else working, but if I turn off grapple to all, it doesn't fire at all, no matter what layer number I enter

    • @TornSilencio
      @TornSilencio 3 роки тому +1

      i have the same issue...did you figure it out?

  • @nightcorealg5765
    @nightcorealg5765 3 роки тому

    am I the only one that checked to see if the video wasn't sped up?

  • @stepheninczech
    @stepheninczech 3 роки тому

    "Perfecter" is a perfectly cromulent word.

  • @garrettbates9124
    @garrettbates9124 Рік тому +1

    I need alot of help with this apparently. I tried to follow as closely as I can but when I tried to grapple onto something It would connect but not pull the player. I saved and closed unity to try again later but now every time I try to grapple I get errors like "Invalid AABB a", "Invalid localAABB. Object transform is corrupt.", and "Invalid worldAABB. Object is too large or too far away from the origin." I don't know why and I don't know how to fix it.

  • @marcosramalho1508
    @marcosramalho1508 2 роки тому +1

    My rope is connecting to the air. What to I need to fix for it to really be launched and only connect to the objects? Is it something to do with layers? if so, what do I need to change? All my elements are with the Default Layer

  • @jay_1686
    @jay_1686 4 роки тому +3

    how to attach it to a Player which also has a rb and has a movement system?

  • @carlaborcem4028
    @carlaborcem4028 2 роки тому +1

    hi, i wanted to make a game with this grappling hook that pulls the character and the other one from the old video that just swings and doesn't pull how do i do that? Could you help me, please?

  • @rahulmathew7799
    @rahulmathew7799 4 роки тому +1

    dude! Thank you!!!!!

  • @kevinyan4438
    @kevinyan4438 Рік тому

    good shit dude

  • @npkrash
    @npkrash Рік тому

    Does anyone know how to do this but with button inputs instead of mouse clicking

  • @animationsbelike
    @animationsbelike 2 роки тому

    Great! :D

  • @greagorysan1805
    @greagorysan1805 Рік тому +1

    What is the connected rigidbody for the spring arm?

  • @FC12CGaming
    @FC12CGaming 3 роки тому +1

    For some reason the grappling isn't working and I fall through the terrain 😕

  • @spaszahov2433
    @spaszahov2433 3 роки тому

    ty very much lifesaver
    xoxo

  • @rmsidewalks
    @rmsidewalks 2 роки тому

    First tutorial Ive watched 0.5x speed instead of 1.5

  • @komiro100
    @komiro100 4 роки тому

    can you make a tutorial how to do like castlevania when you use the swing rope ? i tried but i dont know much coding i did follow this tutorial but it works with the mouse

  • @devsilva7155
    @devsilva7155 2 роки тому

    greate, i finally make a game spiderman

  • @alperakin2561
    @alperakin2561 2 місяці тому

    Does he have a discord server.I tried to change the code for controllers as find the grapple point automatically but that does not work.

  • @EnderElectrics
    @EnderElectrics 2 роки тому

    This is gonna be hard to get working in 3D I imagine 😬
    I'll try though

  • @47smk
    @47smk 3 роки тому

    Thanks man

  • @kuokkamdamha1691
    @kuokkamdamha1691 4 роки тому +2

    I have a question if I want the rope to shoot straight up how do I do it plz help

  • @Blooperzz
    @Blooperzz 8 місяців тому

    hey i need some help whenever i create a URP Particles Lit texture like you did in the tutorial my texture is just the missing texture one..

  • @jackdavies4542
    @jackdavies4542 2 роки тому

    I've typed all the code and put all the references but when I click what I want to grapple to it doesn't do anything. It's rotating the barrel of the gun perfectly fine

  • @hame8471
    @hame8471 4 роки тому

    nice tutorial, but scince im new i dont have the circle as a sprite renderer. how di I get it? do I have to download something?

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      Create png or download one of a circle then just import it to unity

    • @hame8471
      @hame8471 4 роки тому

      Thank you, i guess also of the square

  • @alexandersedig3143
    @alexandersedig3143 3 роки тому

    Any tips for doing this except with the end of the rope attached to an object with a rigid body effected by gravity, and latches to whatever surface it lands on? So you could throw the rope rather then shoot it

  • @skimiboi
    @skimiboi 2 роки тому +1

    is there a way i can add WASD movement to this without breaking the physics?

  • @newbinhoo
    @newbinhoo 3 роки тому +2

    Man, my grappling hook is thrown and it sticks to the wall, but it doesn't pull the player, can you help me? I'm br if the English is a little wrong forgive me.

    • @garrettbates9124
      @garrettbates9124 Рік тому

      Did you ever find a solution? I'm having the same problem

    • @newbinhoo
      @newbinhoo Рік тому

      @@garrettbates9124 No, man.

  • @uskuugeneration9023
    @uskuugeneration9023 10 місяців тому

    Hi there, I am trying to make a grappling hook animation image, where it`s like a chain of some sort, how can I make it so that whenver it is launched that image shows instead of the line renderer. Like the scorpions hook from MK

  • @boozardo8178
    @boozardo8178 Рік тому

    I gues I missed something but after pasting the code for Tutorial_GrapplingRope, it says "Tutorial_GrapplingRope' does not contain a definition for 'isGrappling'"

  • @عمرالشهري-ب3خ
    @عمرالشهري-ب3خ 4 роки тому +1

    The variable m_camera of Tutorial_GrapplingGun hsa not been assigned. You probably need to assign the m_camera variable of the Tutorial_GrapplingGun script in the inspector

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      Literally what you need to do. Go to the inspector, and assign the camera to the script. If you are having more problems let me know. Good luck!

    • @عمرالشهري-ب3خ
      @عمرالشهري-ب3خ 4 роки тому

      I did and still the same thing when i start the game in can move gun pivot direction but i cant see the player and i cant shoot

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      @@عمرالشهري-ب3خ change the layer arrangement so the player and the rope are on top

  • @joshbailey872
    @joshbailey872 2 роки тому

    thank you

  • @miomikkonen
    @miomikkonen 3 роки тому

    next video you could sing rap god

  • @brianwhite8032
    @brianwhite8032 4 роки тому

    Man, I don't know if it's because I didn't follow well, or if it's because I am trying to implement it into a game that already has other functionality... my first question though is what did you attach each script too?

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      Just added a script to the game object who has the rope, can you describe me exactly what happens?

    • @brianwhite8032
      @brianwhite8032 4 роки тому

      @@1minuteunity759 The gun shows in the direction my mouse is pointing, but no function working

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      @@brianwhite8032 A couple of things to check:
      1.are you trying to grapple to the right layer?
      2.the rope animation is what make this whole thing work. do the rope progression curve animation reaches the value of 1 at the last point?
      3.have you added all necessary components (spring joint 2d, rigisbody2d)?
      4. Youv'e said that your game has already other functionalities, is there a reason that a movement script might interapt?
      If you still don't find the bug, try doing exactly like I did in the video, then add to it piece by piece until you'll find what causes the problem, good luck mate.

    • @brianwhite8032
      @brianwhite8032 4 роки тому

      @@1minuteunity759 Okay thank you so much. I will try again tomorrow and let you know how it goes. I appreciate your work so I hope I can get it to work :)

    • @1minuteunity759
      @1minuteunity759  4 роки тому +1

      @@brianwhite8032 Awesome, stay motivated !

  • @yunusbilece8690
    @yunusbilece8690 2 роки тому

    you are a god.

  • @melkerhallstrom9339
    @melkerhallstrom9339 Рік тому

    Hi please help me, everything is working fine except for the fact that when I grapple, my character and the rope kind of ignores gravity. I want my rope and character when grappling to be affected by gravity, keep my current momentum and have to swing in order to get more momentum. How can I do that?

    • @melkerhallstrom9339
      @melkerhallstrom9339 Рік тому

      Update: it is affected by gravity but very slowly sinks down and the rope feels very rigid and like it slightly defies gravity

  • @pigeondev852
    @pigeondev852 4 роки тому +1

    My launch point doesnt work how do I make it move

  • @footedspark
    @footedspark 4 роки тому +2

    The grapple latches to the location but won’t pull the character at all. Any solutions?

    • @1minuteunity759
      @1minuteunity759  4 роки тому

      Hmm. Weird.
      Any errors?
      Have you attached the spring joint, and does your player has a rigidbody?
      What type of launch have you selected? If you try other types of launches does it work?

    • @allthingskidz3967
      @allthingskidz3967 4 роки тому

      @@1minuteunity759 Same problem, nothing seems to fix it

    • @allthingskidz3967
      @allthingskidz3967 4 роки тому +1

      The reason mine didn't work was because the start and end points of the animation were not at 0,0 and 0,1. right click and type in the number, don't move it by hand. It has to be exact.

    • @likyepetti
      @likyepetti 4 роки тому +1

      Maybe I'm a bit too late, I solved it by editing the 64th line in Tutorial_GrapplingRope.cs script.
      The equality that you can see it will never be exact if you don't cast the two number with an int type (because the numbers are not integers but they are very similar to each other for example like this: 4,233 and 4,123.. thus the equation will always be false).
      So the code must be:
      if ((int)m_lineRenderer.GetPosition(percision - 1).x == (int)grapplingGun.grapplePoint.x)
      This worked for me.
      edit: it's not a perfect solution, in same rare cases it may not work.. a better solution would be this: ((int)m_lineRenderer.GetPosition(percision - 1).x - (int)grapplingGun.grapplePoint.x

    • @alpaykuzu7371
      @alpaykuzu7371 Рік тому

      @@likyepetti thank you so much

  • @onur3759
    @onur3759 2 роки тому

    perfeter

  • @lampooot
    @lampooot Рік тому

    It would be more perfect if the rope bends

  • @justneil8724
    @justneil8724 3 роки тому +1

    I cant add the grappling hook object to the script in the inspector

  • @peteypeetepete
    @peteypeetepete 3 роки тому +1

    me doing every step:me getting 1 error on each code: BRUH

    • @mohwiwww8878
      @mohwiwww8878 2 роки тому +1

      same

    • @mohwiwww8878
      @mohwiwww8878 2 роки тому

      the line drow to muse position but the player dosent move and grapple

  • @sheeeeshhhhh2359
    @sheeeeshhhhh2359 3 роки тому +1

    i wish you can make slower and vids and more understandable but good work

  • @negativenod
    @negativenod Рік тому

    you have to watch the video at 0.75 speed to understand

  • @theplaymakerno1
    @theplaymakerno1 3 роки тому

    Hello my friend. How can I support you?

  • @victorcordoba6784
    @victorcordoba6784 4 роки тому

    hahaha it's like you read my mind.
    just what i needed thanks

  • @trashygames2803
    @trashygames2803 2 роки тому

    my Rope shoots at the air instead of on the walls