Spider Man Web Swinging Tutorial Unreal Engine 4

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • In this tutorial I go over how make spider man web swinging in Unreal Engine 4.
    We find points that the player can attach to and when we press the left mouse button if we are in range of a point we can swing from it.
    👉Get Access To All My Unreal Engine Courses At : www.unreal-uni...
    👉Get My Free Unreal Engine Beginner Course : bit.ly/46mUWMr
    Other Links :
    🎮 Marketplace Assets To Help You Build Games : bit.ly/3VvNkBQ
    /
    Animations : uisco.itch.io/...

КОМЕНТАРІ • 100

  • @IcyTGL
    @IcyTGL 3 роки тому +23

    pin this

  • @SwaibaFaisal
    @SwaibaFaisal 5 місяців тому +2

    Hey! Thanks so much! this tutorial was really helpful and informative
    I know this was a couple years ago but here's some tips for anyone looking to add some smoothness or extra optimization to this after completing the tutorial!!!
    I would recommend implementing an enum system (e.g NotSwinging, SwingFiring, Swining, NearTarget or something similar) to help keep track of the different swinging states your player is in, which can help with adding more complex animations, transitions and specific movement tweaks later!
    Having the cable as something that gets spawned and destroyed can be useful in terms of performance later on, same with an actual cable hook!
    When coding with blueprints you can select a node, select another one and press Q to make the line between them straight. This will move the FIRST node to the SECOND node's level!
    If you want to use the same mixamo animations but do not want the animation to affect the player character's movement (e.g if you tune the movement in a way that you do not need/want the root motion of the animations), un-tick "Use root motion" in the animation details section AND tick "Root force lock"!

    • @Nemorium
      @Nemorium 23 дні тому

      Thanks for this! it was really helpful.

  • @TorQueMoD
    @TorQueMoD 4 місяці тому +2

    Thanks for sharing this video because I wouldn't have been able to figure this out without it. That said, there's a lot of room for optimization. For starters, there's no need to run your sphere trace on a timer. You can simply call it every time the player presses the mouse button and it will save on cost. Also, instead of casting to your swingpoint blueprint, which is expensive, you can use the Get Class node from the Hit Actor and compare it (==) to your blueprint class. There's also no point in setting the hidden in game or any of that other stuff from the Swing Input since you're setting them in your Swing Force function. What I did was check to see if Is Falling is true, if not launch the player, then if Can Swing is true, set the air control. Everything else I just handle in the function. Finally, I found that adjusting the hidden in game or the length doesn't even work unless you're doing it on tick, so there's no point in setting that elsewhere. Oh, and I set the World Location of the cable to my character and set the end point to my swing actor so it looks like the cable is originating at the player rather than from the attachment point.

    • @bigredhawkeye5167
      @bigredhawkeye5167 26 днів тому

      How the hell is the location of the cable not being updated relatively to the location of the player actor?

    • @bigredhawkeye5167
      @bigredhawkeye5167 24 дні тому

      also how the hell did you attach the start of the cable to a socket or did you just have it come out of some random single point

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

    bro your clutch I was about to give up on this feature and U my guy came in as an absolute Clutch
    Thanks so much!!!

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

    U and Ryan laley r lifesavers

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

    Thanks for sharing this! 👍✨

  • @wkch6431
    @wkch6431 3 роки тому +10

    Nice tutorial :), but I have a question how can I make so that when I keep swinging my character doesn't fall over time. Thanks

  • @ApeirogonGames
    @ApeirogonGames 4 місяці тому

    Awesome tutorial! Thanks so much for sharing.

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

    You, sir are the GOAT fr

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

    Hi there, could you go into more detail about what's the -400 added to the cable length float and what purpose is it for? I'm trying to do something a little different in my project and I'm sure this is a clue to create the mechanic I want: which is to update players location during runtime based on cable length and when I hit shift. Thanks!

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

    great tutorial! gonna be a big help in my little spider man project, and also keep up the good work!

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

    How would you change this so the web line can trace to any building like if you had a map of Manhattan and wanted to swing from all the buildings geometry so I wouldn't have to place those Cubes everywhere.

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

      late post, but you can delete the swing point BP, and set the make array to a different object type, like static or dynamic mesh

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

    Awesome tutorials! Have done quite a few for my project!
    Is there a way to only use the swinging animation and not the startup?
    The startup halts all momentum which is a no-go for me.

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

    does anyone have a way to make it so it stops you ONLY if your moving away from the center? I wanna set it as a limit so you can jump around while still grappled on, but it'll stop you from going too far away.

  • @farahtatsugaming3776
    @farahtatsugaming3776 3 роки тому +5

    Great tutorial. However, i would like to point out that you are talking and implementing stuff REALLY FAST. it was so hard for me to keep up and to hear what you are talking, i had to repeat every second more than one time just to understand what you said. regardless of that thankyou for the tutorial

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

    Hello I followed your steps but my character line is still extending beyond the chable length when i fall

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

    Thank you so much for this, you are a life saver!!!

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

    If anyone else is planning to make this for controller, the left/right thumb stick buttons work really well (it's r3/l3 for ps)

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

      Hey did you run into the issue of glitching and bumping around when you have low fps? You can check this by using ` key when you're in game and typing "t.MaxFPS 10". Please let me know as I am struggling to find a solution to this. The swinging rn is frame based and has different speeds on different FPS.

    • @SpectrumStudios0
      @SpectrumStudios0 5 місяців тому

      hey, i know you've probably already forgotten but i'm running into the same isue for weeks now and was hoping you had solved it. If you found out how to solve this, please help me.@@fredrick2017

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

    I NEED URGENT HELP, or that's what I should say haha
    I followed your tutorial several times, changing different things each time, the point is that I'm not using a character but a flying pawn, and when using the spider web the rotation of the cable follows the camera's rotation and ship movement (but it's attached to the pawn). The structure is as follows:
    Collision_sphere: {
    - Plane_Mesh (SpringArm(Camera))
    - Cable
    }
    I'm using the default flying_pawn map as base but I changed the camera moving input to the mouse movement instead.
    This is part of something I have to present in two weeks and can't move from this point. I'm sure that when that damn cable stops following the ship everything will work as intended.
    Thanks in advance!

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

    How could you make it so that a widget would pop up when you look at the point,

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

    how can i reduce the length of the cable so that its short. and also prevent falling..

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

      have u found the solution brother

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

      @@NePhoosStAr no

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

      @@QuantumPlayLabs idrk but you could try reducing the radius on the SphereTraceForObjects function?

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

    mate can u do me a favor and make a tutorial on a npc for a horror game like slenderman? because I need an npc that acts like slender men and will appear whenever to get you, thank you if you do amd also happy 1.250k subs

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

      thanks for the support and checking out my videos, I can but not for a while working on a few things

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

      Good luck on your other projects

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

      @@SodiiumAnimation thanks

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

      @@UnrealUniversity the swinging animation is not showing, its only the start swinging animation

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

    Thank you i was really lost

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

    for some reason my character slowy heads towards the ground and once the collision fails it just drops, I don't know how to make the distance between swing point and player max out

  • @machishop5395
    @machishop5395 5 місяців тому

    i cant swing on the second swing point please help!

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

    You can tell this is the tutorial the avengers game spiderman was made from with the swinging lol

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

    Hi, I'm using UE5 and I'm trying to add an Event beginplay to the blueprint, but all it does is send me back to the existing one that was already in the blueprint. Help would be appreciated!

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

    Animation just doesnt work

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

    Nice video man! Can you do a crouching animation? All the tutorials are super hard and I dont found a nice tutorial for that but I love your tutorials so I will be very grateful if you can make a crouching animation in u4 please 🙏🏻, have a good day!

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

    Swinking

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

    once he has finished swining he is sideways when walking again, please help

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

    Awesome! Thank you! Very cool!

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

    Hello, I know this is old but I was wondering if you could go into what changes need to be made to make this work for a 2D character? I recently went through your course on 2D game dev in Unreal and I enjoyed it a lot. I tried to figure out a way to apply this swinging mechanism to a 2D game I'm building but the cable doesn't attach to my character and they just hop a bit on the ground when the command is entered...other weird things happen when the character is airborne but the cable never goes away. Any insights would be appreciated.

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

      Never mind, I figured it out. If anyone else is curious I'll be happy to share my insights.

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

      @@JonathanPriceArt Hey, could you share your thought on implementing this to 2D game?

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

      @@grzegorzprzytarski5581 hey, it's been a while since I worked on it and it's not really fresh in my mind, but the main thing I recall changing was just before the Launch Character action at around 13:43. Since I was working on a 2D game with a sprite, I used the input action I'd created for moving left and right multiplied by a value for the Launch Velocity X with XY override ticked in the Launch Character node. The primary goal is to modify numbers to suit the character size and make sure it's only focusing on movement on the X axis. A lot of it will depend on the size and design of the character in your 2D project. I may try to reproduce it in a video when I can because it does work well in my personal project.
      I also used sockets and scene components to determine where the cable should attach, but again that's dependent upon the design of your player avatar. If you're using a 3rd person character the way this tutorial is, that's not relevant.

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

    Hello , can you make a tutorial , when the character breaths , the steam get out of his nose or mouth like when it s cold outside , pleasee

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

      The way I would do it is, event start and custom event hook up to a delay, delay goes for however long you want the delay between breaths to be, then activate the particles (there are some tutorials online for that if you don’t know how to) then finally trigger the custom event

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

      Btw you trigger the custom event at the end so that the breathing loops

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

    How can i have more than one swing point i copy and pasted the swing point but it allways connects to the original one
    and when i move it form its original spot i cant swing from it anymore please help!

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

    I followed the tutorial but on the calculate swing force when I finished I can’t compile it because in the result thingy it say compile of third person character was successful but 1 warning it says in 102ms how do I fix?

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

    Pliss tutorial of phasmophobia -tutorial of EMF

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

    Nothing personal but this was kind of hard to follow. If you could speak a bit slower and articulate a little more it would improve viewability a lot. Keep up the good work!

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

    The code works for me but I don't know why spiderman does not propel when I shoot the spider web

  • @s.kanessuperbiatv6464
    @s.kanessuperbiatv6464 2 роки тому

    I've followed this tutorial by the letter 3 times and I still can't get it to work where you test it first

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

    can you do simple niagra tutorials, please..

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

    It’s not letting me connect out hits and break hit result Whag do i do?

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

    How can I stop the rope from extending so far?

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

    when im done swinging the swinging animation keeps on playing. Can someone tell me what to do please?

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

    Simply god

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

    hi! is there a way to make your character smoother when swinging , like if your swinging the character body rotates with the cable? thanks you!

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

    Can someone please help? im trying to import the animations but it gives me an error because i have a mixamo character, it has something to do with the root bone

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

      you need to import animations from Mixamo too, or do animation retargeting.

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

      @@savit3r My problem was that there was no swinging loop in mixamo but problem is solved, thanks

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

    Excellent

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

    Cool vid but how can you increase the range for swinging from swingpoints?

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

    Omg wow!!

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

    how do you make it shoot where you look

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

    Hi, why is the cable length increasing time by time. or maybe if could help me on how can to set the maximum cable length. I would really appreciate it

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

      Have you found any solution?

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

      Well I just commented and now I found a solution

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

      not perfect but it works

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

      @@wkch6431 how, could u explain. It'll be really helpful

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

      @@NePhoosStAr Yes sure, as I alredy said it isn't perfect but it kinda works. Where you calculate the swing force you only need to multiply the vector by 2,5 or 3 before you hook to the "Add force". This way you won't fall over time and the cable length will stay the same. I hope you it works and you nderstand because it is a bit messy, ask me if you have any question.

  • @b2anxle..486
    @b2anxle..486 2 роки тому

    Some reason it comes out my foot even tho i did it The exact same

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

    i try Em :D

  • @dolphinrooinc.1609
    @dolphinrooinc.1609 2 роки тому

    Hey, I have a question when I start to swing the model turns at an angle and when I let go he doesn't return to the standing position. Did I do something wrong?

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

      i had the same thing. Did you figure it out?

    • @dolphinrooinc.1609
      @dolphinrooinc.1609 2 роки тому

      @@TheFrozenFlame05 nope, he just starts sliding around in a falling pose

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

      @@dolphinrooinc.1609 so i actually figured mine out. Mine was tilting because my falling animation had my character's root bone rotated in a weird way. I fixed it by just finding a new falling animation, but i think if you can find a way to quickly reset ur character's rotation before the swing animations, it should work.

    • @dolphinrooinc.1609
      @dolphinrooinc.1609 2 роки тому

      @@TheFrozenFlame05 honestly that sounds helpful, lol but I'm more of a visual learner. But seriously that was really helpful

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

    every single time i swing it just rotates my charecter

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

    You didn't cut it out... :D

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

    and for some reason the animation is sideways

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

    My cable is legging

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

    астанавитесь

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

    Dude, are you in a hurry ? Why are you talking so fast, unfortunately, this significantly reduces the quality of your tutorial.

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

      I am not in a hurry I just go fast, will try to take that into account thanks

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

    don't pin this