BP 3rd Person Game: Add Physics Components for Punching | 21 | v4.8 Tutorial Series | Unreal Engine

  Рет қаралды 63,123

Unreal Engine

Unreal Engine

Күн бұрын

(00:05) - Intro
(00:34) - Adding Collision
(02:28) - Right and left hand collision
(04:18) - The Construction Script
(06:32) - Determining the bone name
(08:12) - Turning on collision when punching
(10:08) - Adding a prop and wrap up

Пікірлер: 69
@OscarDesailles
@OscarDesailles 7 жыл бұрын
Hey! For those finding a Deprecated function. In the Construction Script, you need to Right-click and search for attachtocomponent, and there will be several options, like AttachToComponent (Mesh), AttachToComponent (Camera), AttachToComponent(LeftHandCollision), AttachToComponent(RightHandCollision). You need to add the Attach To Component for each collision, the variables will be instantly added, you just need to be careful that the HandCollisions are in the Parent socket and drag the Mesh variable, just like in the video, and attach it to the parent. Then you need to set the Location Rule to "Keep world" or "Snap to target" , whichever you find better. If this works, you'll see the spheres moving along with the target in the Viewport once compiled. For the Spheres to be more precise you should add a socket and use the "Snap to Target" location. Hope this helps!
@natalieivey23
@natalieivey23 5 жыл бұрын
I am confused because you can't have the mesh and the HandCollisions in the same parent socket. Should I make another AttachToComponent?
@AdamJanz3D
@AdamJanz3D 3 жыл бұрын
5:28 "Attach To" is now "Attach Component to Component" (shown when dragging a wire off of your LeftHandCollision component and searching for "Attach"). 7:12 "Attach Type" is now separated as Location, Rotation, and Scale individually. Choose "Snap to Target" for Location and Rotation, and "Keep World Scale" for Scale, to mimic the setup used in the video.
@kingxcrowns
@kingxcrowns 5 жыл бұрын
Simple Fix For AttachTo [ Engine V 4.22.1] : Q: Whats Wrong? A: Notice he only uses an ' AttachTo ' not ' AttachToComponent ' which also does not let you use your L or R hand Collision as the Target. Soloution: In your Character_BP, in the Construction Script tab; right click - search ' AttachToComponent ' get the one without brackets as I typed. Then drag a wire off of 'Target' In the "AttachToComponent", search for your Left Hand Collision. It will say under components [ "Get Owner 'LHCollision" ] *Note My Names For Hand Spheres Are Different: Left = LHCollision, yours will be different when searching* In the settings for "AttachToComponent" : - 'Location Rule' Set to Snap to target - 'Rotation Rule' Keep Relative - 'Scale Rule' Set to Keep World This is the equivalent of changing the old "Attach Type" - 7:19 Attach 'Mesh' to "Parent" as shown - 6:20 Repeat the process for your other hand. If you are signed in and this helped, leave a like as it could help out many!
@escorpianoyqueee
@escorpianoyqueee 7 жыл бұрын
Hi.. AttachTo is deprecated in lattest version... i'm strill figuring out what should be the replace for that method, can you provide? Your tutorials are great btw. Thanks.
@grn1
@grn1 5 жыл бұрын
@@ShellYoung Thank you, 2 Years later this is still relevant. I also changed the socket names in CharacterBP > Construction to middle_01_l and middle_01_r. That puts the collision spheres a little closer to the front of the hand which I felt was more accurate. It's possible to see the effects of said change by going to CharacterBP > Viewport.
@stiperunac1448
@stiperunac1448 9 жыл бұрын
You guys are awesome!
@matthewschwab9137
@matthewschwab9137 5 жыл бұрын
Was Using engine version 4.19, and I couldn't get the punching collisions to work. If anyone else runs into the same issue, I fixed it by follow the video, but to also alter the left and right hand collision spheres, setting the field Collision-->Collision Presets to Block all
@ReginaldusGaming
@ReginaldusGaming 5 жыл бұрын
VERY USEFUL VIDEO!!! Came here based on advice i read on an old forum post (guy name kennyrosenyc ) and i was not disappointed.
@BasedReda
@BasedReda 8 жыл бұрын
Another one year anniversary UE4 video! OMG I am on a rollll!
@Garycarlyle
@Garycarlyle 3 жыл бұрын
Not going to make this into a playlist? It is still the best series on the channel. :)
@klausbdl
@klausbdl 6 жыл бұрын
Is much easier to set the collision sphere PARENT to a bone in the viewport. to do that: Just drag the sphere into the mesh (in the components pannel), Set parent socket to the correct bone, Then adjust the size and position to the character and Its done! 0% need to use the Construction Script
@henrybluefilms
@henrybluefilms 4 жыл бұрын
Thank you
@ian1842
@ian1842 7 жыл бұрын
For those wondering why their punch is not moving the ball / why the collision is at their feet. Make sure to use AttachToComponent instead of attach to, set target as right and left hand spheres and parent "mesh". Set rules to snap to target. To see it in game more clearly open the right and left hand collisionspheres details and search for "hidden in game", turn this off and when you run the game you can see the spheres on his hands!
@andersonchong7625
@andersonchong7625 6 жыл бұрын
Sry to interrupt, but i've checked all the statements that you have stated out, and it still doesn't work out. My character's hand just passed through the shapes instead of knocking them off. Then i tried to turn off the "hidden in game" thing that you have stated, the collision sphere is passing through the shapes too...
@takore2
@takore2 8 жыл бұрын
@Random Preston I am also using 4.9 and am not getting any crashes. I did do this a little different than shown here. Instead of using the construction script to bind the spheres to the mesh I just dragged them both to the mesh in the components sections. Not sure if that is a feature or not in 4.8 but yeah. Once it is parented to the Mesh you can go into the spheres details and select the hands as the socket to bind them. I hope that made sense.
@InfohazardGames
@InfohazardGames 8 жыл бұрын
+brendan scofield Thanks, that fixed the crash for me!
@takore2
@takore2 8 жыл бұрын
SlenderMann no problem, glad I could help :)
@PuchoMacker
@PuchoMacker 8 жыл бұрын
+brendan scofield Thanks! This fixed the issue in 4.9. I can't seem to get the collision spheres in place, though. Looks like the skeleton is outside the mesh.
@ramirolinares2376
@ramirolinares2376 8 жыл бұрын
+Jorge Gonzalez same problem :( . It didnt crash it but i can't get spheres collisions parented with the hands
@PuchoMacker
@PuchoMacker 8 жыл бұрын
+Ramiro Linares The spherical collisions follow the animation even though they are not within the mesh. The quickest and easiest solution we could find was placing the spheres manually on top of the hands of the model. You can do this by going to the character's blueprints and in the viewport tab, selecting the spheres and moving them accordingly. Since they follow the animation, this method solves the issue.
@kylekingstone1059
@kylekingstone1059 7 жыл бұрын
If someone wondering how to avoid spamming of the punch animation, then just break the link to reset input on "do once" and drag to this input the link from the montage end sections.
@colinericburriss
@colinericburriss 7 жыл бұрын
Unusually I encountered no problems and enjoyed this tutorial very much. Can the collisions be made strong enough to propel my character backward?
@mistypixstudios6304
@mistypixstudios6304 6 жыл бұрын
just a tip, if you want to rotate the viewport, holt ALT and drag with left mouse
@louisclark
@louisclark 6 жыл бұрын
I added an extra cylinder to be able to punch. Made it twice as big and have been messing around with the MassInKg. I can get it to where bumping into it has little effect but if I punch it, the cylinder will always go flying off like it was a really hard punch. How can I make the physic of the punch less extreme? Like make the sphere or cylinder react to the punch as if it were heavy and not light.
@SeevenElo
@SeevenElo 8 жыл бұрын
Hi, you mentioned it was not the "ideal" way of doing this, what would be a better practice then?
@wdrazzen88
@wdrazzen88 7 жыл бұрын
does anyone know how to have the punch add damage to a enemy every tutorial on damage is for first person shooter I've tried casting to third person but no luck
@alienkawala8287
@alienkawala8287 8 жыл бұрын
Punches are crashing my computer, any idea as to how to fix? going to troubleshoot some hardware, maybe i need to update my videodriver.
@lizramazetti4041
@lizramazetti4041 7 жыл бұрын
my sphere keeps moving to the feet
@LetsPlayAceCraft
@LetsPlayAceCraft 7 жыл бұрын
The problem with this video is that the hand colliders are only enabled while you are holding left mouse, not while the punch animation is happening.
@ec75413
@ec75413 7 жыл бұрын
Good Point. If this really matters, you can make two Notifies fired when PunchEnd animation finishes. And you may create a function for CharacterBP to make collision enabled. (This part is not really necessary) Then in EventGraph of CharacterAnimBP, let the new notifies calls the function (Or if the function is not built, just get the collision components and call SetCollisionEnabled) Mine for example imgur.com/a/F2kdG
@LetsPlayAceCraft
@LetsPlayAceCraft 7 жыл бұрын
Ah. very nice solution. I made my own solution, but its less elegant xD
@Taydog01
@Taydog01 8 жыл бұрын
So i finished everything up but when i get into the game and i punch once the whole engine crashes? I have tried about 5 times does it over and over again.
@emmicd11
@emmicd11 7 жыл бұрын
it depends on your cpu, ram and most importantly video card. What are your computer specifications? I can tell you what you need to upgrade to get UE4 running smoothly.
@GafGafgarion
@GafGafgarion 3 жыл бұрын
My CharacterBP hit and collision, al works fine, BUT he hits better from "behind", i dont understand why the collision works from behind if the spheres are attached to the hand perfectly.
@Vorpike
@Vorpike 7 жыл бұрын
Fists go right through the sphere in 4.16, rewatched video many times and was functioning perfectly up until this step, also looked over all the comments. I suspect it's a depreciation issue.
@AtXPHILLY
@AtXPHILLY 5 жыл бұрын
Move the collision spheres to the index fingers. The hands are actually the wrist.
@thomasabramson100
@thomasabramson100 4 жыл бұрын
5:42 cannot get attach to only attach to component (diffrent node)
@simonpoling620
@simonpoling620 8 жыл бұрын
I just finished this tutorial, and when I punch something, nothing happens. I followed the tutorial to the letter and have had no problems with this series so far, but now I'm stuck here. I'm using version 4.11.2. Any help would be appreciated.
@TheThejokekid
@TheThejokekid 8 жыл бұрын
it's because of how the collision is set to true, as it is in this tutorial, you only have collision while you're pressing the punch button
@MySGsuxballs
@MySGsuxballs 7 жыл бұрын
I'm not sure if you've already solved this but for future reference I personally wanted the players hands to collide regardless of animation so I just scratched the last half of this video and selected my collision spheres, went over to the details panel and under collision and collision presets I changed the drop down to BlockAll, nothing else seemed to apply collisions properly.
@farkasvilkas5839
@farkasvilkas5839 6 жыл бұрын
items, for punch physics work: 1. on scene: cube, but not sphere - more control 2. hand collision - BlockAll 3. hand collision - Hidden In Game = off - for debug picture
@anthonypriest7331
@anthonypriest7331 7 жыл бұрын
Im not getting a get collision enabled nod, why is that?
@anthonypriest7331
@anthonypriest7331 7 жыл бұрын
nvm got it
@anthonypriest7331
@anthonypriest7331 7 жыл бұрын
or not... forgot to turn off collision for spheres. Thought that would fix, but nope
@Maxine07
@Maxine07 8 жыл бұрын
I Do everything like in this tutorials but when i punch sphere nothing happend at all can you explain me why
@Bob-ks6dg
@Bob-ks6dg 8 жыл бұрын
+Max Me too!But I always turn on the collesion and change the collision type to pawn,it work.......anyway it work!I could push the sphere away now.
@simonpoling620
@simonpoling620 8 жыл бұрын
I'm having this issue too. Did you ever figure it out?
@Bob-ks6dg
@Bob-ks6dg 8 жыл бұрын
I don't have anything yet~Sorry~~~
@zoltern
@zoltern 8 жыл бұрын
In the construction script, change to AttachToComponent (not the actor one) then leftHand goes into Target, Mesh goes into Parent and Location Rule set to Snap To Target. Same thing for the other hand. This solved the issue for me on 4.12.4 Good luck :-)
@Bob-ks6dg
@Bob-ks6dg 8 жыл бұрын
Would U mind create a video for what U said?I couldn't understand...the solution that U said just looks like the same way which this tutorials used.
@nightRanger0077
@nightRanger0077 5 жыл бұрын
Punching a 1 tonne sphere like its a balloon. Seems real...
@animeanime8907
@animeanime8907 7 жыл бұрын
Use Cube if you can't punch the sphere.
@0u73rh34v3n
@0u73rh34v3n 5 жыл бұрын
2 more!
@LudwigvanBeethoven2
@LudwigvanBeethoven2 5 жыл бұрын
My character can punch without having any punch collisions 🤔
@hjs0724
@hjs0724 6 жыл бұрын
If your character has unuseful ghost punch, check this option 2:07.
@dualxsurvival155
@dualxsurvival155 8 жыл бұрын
cant get my guy to stop punching have reviewed all the vids and cant seem to find the problem
@escorpjao
@escorpjao 8 жыл бұрын
the 4.9 is giving a crash
@user-tv5ru9wv2b
@user-tv5ru9wv2b 3 жыл бұрын
РУССКИЕ ВПЕРЁД!!!!1
@wangda2572
@wangda2572 9 жыл бұрын
4.7 的 又来一遍 4.8 的 一点新东西都没有
@zding7578
@zding7578 7 жыл бұрын
If you think you have done everything the tutorial said but when you were punching ,nothing happened,you should find the sphere -detail - Physics - Simulate Physics ,and tick it. English isn't my mother tongue but hope it can help.
@DemetrisLeptos
@DemetrisLeptos 7 жыл бұрын
lol that blue arrow in every video..
@lizramazetti4041
@lizramazetti4041 7 жыл бұрын
my guy wont punch at all
@AchannelWithNoNameAn
@AchannelWithNoNameAn 7 жыл бұрын
For those of you who can't punch the sphere away: in the viewport, select hand colision and in the detail panel set colision to blockall
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 10 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 134 МЛН
Level 1 to 100 Impossible Puzzles
17:25
Hafu Go
Рет қаралды 3,4 МЛН
Why Solo Developers Should Use Unreal
10:55
Thomas Brush
Рет қаралды 345 М.
The REAL Reason Unreal Engine VFX Looks FAKE
6:58
Joshua M Kerr
Рет қаралды 377 М.
UE5: How To Make Bullets - (Projectile Movement Blueprints)
3:43
Why Unreal Engine 5.4 is a Game Changer
12:46
Unreal Sensei
Рет қаралды 1,1 МЛН
Кім бірінші schoolboy runawayды жеңеді?
24:24
ҚЫЗЫҚТЫ-СӘТТЕР
Рет қаралды 61 М.