UE4 - Tutorial - Physics Constraint Actors

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello guys and gals welcome to a new tutorial in this video we're going to be covering physics constraints and how we can link together multiple objects and have them swing from one another as if they were attached in a physical manner yay yeah you play the balls that's what she said no she didn't she didn't say that nobody said that right so it's actually not too difficult to do we can add a cable as well these cables actually aren't part of the system I've just added these because they look a little nice so I'm gonna show you guys how to do this the first thing we need is we need a mesh for an you know the the initial anchor so what I'm going to do is I'm going to take a cube you know if this guy up a fair distance cuz you know I need you know we want some space for for something to swing from now on the right hand side under transform under location I'm going to copy the location by right-clicking copying you know place a sphere in then I'm going to paste it there and then just move this down now the reason I've copied and pasted that info is just so that I can make sure that the X and the y are exactly the same without me having to manually place them and then I can just change this edge because I obviously want this to swing down a little lower next thing we'll do is in classes we were going to search on for physics constraint actor we'll drag one of these into the world and same thing I'm going to paste the location of the cube and then move this down a little bit now the reason I want this to go down a little bit is because this is kind of going to be this central point for our frat swing we want this to be pretty much centered where we want to have this and you'll see why in a moment in the right hand side here now what we have the physical constraint selected you can see we've got constructor 1 and can straight act it do so constrictor 1 is going to be our anchor so we're going to click the little eye drop and then click a cube and you can see now we've got this red highlight and then this red line to our physics constraint actor this means that those two things are now linked the second thing we'll do is choose constructor two eyedropper IQ at a sphere rather and we'll press play and then if we touch this oh nothing happens and then we'll get an error the reason nothing happens is because this guy is not similar in physics so take this and then we press play now it can walk into this and it'll swing around now this is going to have physics enabled you know the default physics settings so even if you were to shoot this it would move you can affect this with gravity impulse and force what we want to do next just because we want to make it look a little sexy is we're gonna go to cable we're gonna get a cable actor OOP we're gonna once again paste the location of a cue we're gonna bring it down low excellent to be actually inside the cube yeah and now what we will do is with the cable selected you see we've got attached end to on the right hand side other actor I drop and the sphere now when we do this you're going to notice that the cable isn't actually attached the reason this isn't attached is because by default when you bring in a cable the end location has an X of 100 the reason this is is so is because when you bring it in you can see that it's got this nice little tributing it's kind of just like showing you what this thing is capable of it gives you like a default value so you can see that it's not just a stick okay so what we'll do is we'll just put that back to zero and I'll be inside a sphere we press play you can now see that the cable will act with this fear yay you can set multiple up and just have them all swinging around yeah well now these things aren't limited to single-use now what I'm gonna do is I'm just gonna need to get rid of this cable just to demonstrate this I'm gonna move this up a little bit and then what I will do is I will make another sphere and just copy that over then with that copied over what we will do is we are going to change the anchor to the sphere and the linked point to the noosphere now you can see here these have dropped down pretty far with these drops oh that's why they drive so far I didn't actually make a copy so we want to do is place that where it's supposed to be make a copy give this the new anchor point and then you endpoint very ah and now if we were to push the bottom one it would react with the top which would then react with the cube so we get this nice chain effect as you can see there and they have it physics constraint actors I love using this mannequin like he's like hey and we see him like an avatar like it's just like put him in every single thumbnail almost every sub male see if you can spot them all it's not difficult and I hope some of you guys will find that useful hopefully that explains a few things and you can set these up really quickly obviously you don't have to use cubes and spheres you can use your own meshes so you can have a chain you know if you wanted to change our out like a full chain then you'd need each link to be physically constrained between each link and now we get a really nice chain effect and obviously these aren't limited to just the meshes let's just show you this and you don't have to have them begin in a specific place so if we do that see it is high drop that guy you can see here we can start this out a funky angle I'm scared of this and summers probably will work as intended but area.we it's gonna hold that cute at that cone at the angle that it was originally so you see here because we've got this constraint actor at this angle it's going to hold it at this angle so when it swings down this is gonna be on its side so you can almost assume that this blue line here is the exact link and it's treating this is the top and same here is tree this is the bottom for it to move things are out of it it gets one funky swinging there you go point point point point and I hopefully some of you guys I find that useful I'll see you next time [Music]
Info
Channel: Dean Ashford
Views: 48,512
Rating: undefined out of 5
Keywords: UE4, Unreal, Engine, Indie, Game, Dev, Student, Balls, Tutorial, Dean Ashford, Stuido, Video game, development
Id: erqu8mGJAYE
Channel Id: undefined
Length: 6min 49sec (409 seconds)
Published: Fri Mar 09 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.