If all I had learned from this vid had been the DOT PRODUCT, it would have been totally worth it for that alone! Thank you very much!
@Unain9 жыл бұрын
Added some annotations to fix the problems you might have in 4.9+. The fixed parts should look like this: i.imgur.com/5vVXJZo.png and i.imgur.com/GJBzc0Z.png
@chrisobrooks66629 жыл бұрын
+Unain I came across an issue within UE4.10 where i cant seem to find the Add force at location node (12:36 in the tutorial). it could just be an oversight on my part, but i couldn't seem to find a replacement of some kind anywhere. Any help would be appreciated i'm fairly new to UE.
@Unain9 жыл бұрын
+Chris O Brooks You can try to drag directly from the ParentComponent variable (that should fix it). If it's still not in the list, uncheck "context sensitive". It should still be there in 4.10. Let me know if that works.
@chrisobrooks66629 жыл бұрын
+Unain When I unchecked "context sensitive" it fixed my issue and i found the Add force at location node. thanks for the help.
@Unain9 жыл бұрын
Chris O Brooks Yeah, that usually happens when you don't drag it from a variable, it hides functions that need a certain variable :). You would have probably found it if you dragged from the variable too (with context sensitive active). Glad it worked though ;).
@zetsology8 жыл бұрын
Thanks for this additional info. I must admit I was stupid to start learning blueprints here, although it's really fun. Can you suggest some other source tutorial for beginners other than official ones?
@xultros38687 жыл бұрын
2 years later, still very usefull. Thank you very much Unain, this is a nice tutorial! :)
@vincentprom92655 жыл бұрын
Awesome tutorial man. These physics work way better work for an arcade-type type racer than the built-in vehicle physics.
@ghostravenstorm8 жыл бұрын
7:10 - I'm a little confused. Why does each hover component need to tell the same mesh to simulate physics? If the cube itself is what's simulating physics, then why move move to event begin play on the cube?
@novaria3 жыл бұрын
true. I personally just activated the physics simulation on the mesh itself via the checkbox.
@KnobbyNobbes9 жыл бұрын
You are awesome man! This is exactly what I need for making my boat float in water (float, hover, no real difference!). A thousand thanks for sharing your brilliance!
@Unain9 жыл бұрын
KnobbyNobbes No problem, glad you liked it :). Good luck with your game!
@DrJackalPhD8 жыл бұрын
Hey Unain. I just want to say thank you for this tutorial. I didn't read the description like an idiot and got pretty frustrated with myself. Once I did read it, everything worked fine. This is a big step in the right direction for my project. Thanks a lot man. You're a big help.
@Unain8 жыл бұрын
No problem, good to hear that you were able to overcome the problem. Good luck with your project!
@visual-electronics9 жыл бұрын
Thanks for this. For anyone having trouble and box hits ground and bounces slightly. This is normal Physics. Solution is you do not have HoverComponents attached CarMesh correctly.
@inactiveaccount20909 жыл бұрын
+godzyxw Either that or the trace length isn't long enough, that's why it was bouncing for me lol
@prog.jogosdigitais97862 жыл бұрын
in 2022 and still amazing!!
@Rac00nn79 жыл бұрын
I having issues trying to do this in 4.9. I'm using my hover bike mesh i made so the first issue was the " cast to primitive component" it said i already had a mesh and didnt need it so i continued without it. but when i "add force at location" i dont have a component for it so i used the parent component from variables. everything compiled correctly but when i tried it out it would just fall to the ground and wouldn't move. please help
@travispierce98869 жыл бұрын
+richard defazio answered on SnooseIRTL's question by sima adrei!!!
@Unain9 жыл бұрын
+richard defazio Be sure to check that you have filled in all your HoverComponent variables, like I do at 14:50.
@salikrehman34687 жыл бұрын
hello richard... did you solved this problem. if you done it, please help me out i also get same problem Reply soon.
@PEMBYSGAMINGWORLD2 жыл бұрын
9:32 - add multiply up vector by a float is where i hit a problem. All i get is Math/Float/Multiply by PI. At this point i knew I HAD F**KED UP! Great tutorial up to there HEEELPPP!!
@LiltGarden8 жыл бұрын
this tutorial is so great. one thing I've been struggling with - how do I get it to accelerate and how can I configure its breaking speed?
@DanielBrown-zv1zy11 ай бұрын
I think you’d have to set parameters for your movements while controlling the vehicle. Like creating an additional input to give a boost effect or setting the reverse input to be a certain speed while in forward motion then having a default for moving from a single position. I’m just spitballing but hopefully this helps with finding an answer! 😊
@tyraxgaming49636 жыл бұрын
At 13:48 The node INIT COMPONENT only accepts varibles, NOT meshes. PLEASE HELP ME!!
@NordicDetectorist8 жыл бұрын
i got an Error because of "None" ParentComponent ........ what i should do?
@DragonFlairr5 жыл бұрын
when i try to add force to the parent component it wont find the parent component just add force at location and add force at location local why is this?
@Tendou-Gaming8 жыл бұрын
can this concept be applied to buoyency (i.e. making a boat float on water)
@soaacademy8 жыл бұрын
I think there's a problem with the Torque. If you keep cheked the dot product you'll see it keep going above and below zero. This generates a problem when you're not moving forward/backward with the steer. I tried to fix it moving the check > 0 to something like < 50 AND > -50. Now I have a range of 100 where the steer is not taking the dot product in consideration and it look like working better.
@imagine-games66778 жыл бұрын
could you provide a photo of how you did this?
@ghostravenstorm8 жыл бұрын
I'm not getting these same results in 4.14. It just lies flat on the ground.
@EthanThomson7 жыл бұрын
change the values for the trace and the hover force. I had the same issue
@MstrLAM7 жыл бұрын
Make sure your HoverComponents are actually children of the HoverCar blueprint (Open up your HoverCar blueprint, look at the Components list, select all of the HoverComponents and drag them on top of the car mesh to set it as the parent)
@Kazurgon7 жыл бұрын
Did you fix it Stuart?
@Archwarder236 жыл бұрын
@@EthanThomson I'm having the same issue. Do I need to make the trace and hover force values higher or lower?
@GamingwithPortals4 жыл бұрын
@@Archwarder23 try 60 on the length and 60000 on the force
@3dnovarider8194 жыл бұрын
I started with a flying Pawn scene and how,even if I erase the flying pawn object, when I hit posses it continuisly posses que flying blue UFO instead of the Hovering Car , do you know how can I fix this?
@up-7656 Жыл бұрын
if you have time, can you show how to add floating to the double jump? I would like to do it like D1 or D2 but I can't find anything.
@agoogleuser48599 жыл бұрын
At 14:00 you're able to call an init component for each component but mine only has HoverCar Component. Cant find what i did wrong (4.9.2)
@agoogleuser48599 жыл бұрын
+T Koppenhaver okay so i deleted initcomponent and then recreated it and NOW its letting me do it, even though I set it up exactly the same. Now my box falls to the ground, bounces barely and then sticks to the ground.
@sleepnauthero3677 жыл бұрын
v. 4.15.2 cant find inint components? reference 13:47 in video
@hollyhawkins84554 жыл бұрын
This was an awesome tutorial! I was wondering how I could make it so that if the car falls off an obstacle and is on it's side/back that the player could upright it and keep playing, eg tap A and D alternating to wiggle the car back to upright, how would you do this??
@AttitudeOverTalent9 жыл бұрын
First of all THANK YOU!!! Amazing! My "hover car" seems to want to switch directions if I hold it in one directions like its fighting the other side type thing. Not sure whats going on. Anyway, very cool stuff.
@novaria3 жыл бұрын
this approach is flawed. Somehow the line trace gets skewed the farther away I move the mesh from the World Origin. Why is that?
@adrianuskevin37207 жыл бұрын
why the hover vehicle falls very slow when jump? I tried to add mass to CarMesh and the result still not what Im expecting. I did this in 4.14 it works fine btw
@felipefrango7 жыл бұрын
Having this same issue! Got it working in 4.16 and even expanded on it a bit, but the car falls like a pice of paper haha.
@someonewithsomename7 жыл бұрын
Because of Linear and Angular Damping set so high. You need to make a way to stabilize bounciness independent to the whole body physics simulation
@chijunky61455 жыл бұрын
So, take the node in the linetrace of the hovercomponent, and if it DOESN'T hit anything, the false part of the branch, then set linear damping of the cube to 0, instead of 3. Keep angular damping at 5 though, if you don't then the car spins like crazy int he air. Basically, the damping should only happen when the suspension springs are in play, but when you're in the air they're not, so set the lineardamping to only occur when the linetraces actually hit something, as in if the vehicle is actually making contact with the ground.
@RanElliott9 жыл бұрын
it just keeps crashing every time i try to compile?? and when i try to not use cast to primitive componant instead and plug it in directly it wont allow and says its not compatable...this woould have been awesome but i'm giving up after 20 crashes. i'm using 4.10 i'm sure it changed and thats the problem
@nickguerard9136 жыл бұрын
Working with 4.17, I'm not noticing any changes needing to me made. Followed tut to the teeth, make sure you don't miss anything he says.
@ReaverLordTonus7 жыл бұрын
3rd time editing: Finally got this working, had to assign the individual hover components to 'init component" as well as link them all to the car mesh. now I just have to figure out how to add a bit of a drift force to the turning and also find a way to keep it attached to the ground.
@joshuajebadurai72107 жыл бұрын
Awesome tutorial, I loved it. Of course needed to change a little bit for the 4.17.
@lastdies9 жыл бұрын
Blueprints is also in C ++ code only in the combined units for convenience. I think there is no difference.
@TheLegoflims9 жыл бұрын
This has worked great and is exactly what i needed for my game, One issue is if you go up a ramp you can fly into the sky forever, Any idea how to fix?
@DyskoVolante9 жыл бұрын
+Lewin Did you ever figure this out? I even went as far as to crank the world gravity and still no fix.
@chijunky61455 жыл бұрын
@@DyskoVolante You just need to check if the cube is close to the ground, and only apply forward force if it is. You can do this by doing a line trace the length of the hovercomponent tracelength, any of them will do if they're all the same length, otherwise take the longest length (eg in a monster truck that has bigger wheels in the back than front), the start location of the trace should be GetWorldLocation(cube), split vector, hook up x and y to the split vector on the start of the linetrace node, then do a GetWorldLocation or GetComponentLocation of one of the hover components, split the vector and hook up the Z to the empty Z of the linetrace start node. This shoots a ray down in the direction of under the cube, the length of the linetrace length, which basically checks if the cube is close enough to the ground for the wheels to make contact. Then, on the boolean hit output of the linetrace node, make a branch. If true, then accelerate forward/backward, if false then do nothing. The cube will only accelerate if the hypothetical wheels make contact with the ground, now.
@whatisawontheinternet4 жыл бұрын
Great tutorial, however, I am experiencing 1 problem, that is I cannot get my hover vehicle to turn. I am very new to blueprints and am aware that this tutorial is outdated however it would be great if I could get some help on this.
@MstrLAM7 жыл бұрын
Thank you for making this, I am so grateful for people like you!
@PandaBot20012 жыл бұрын
I know this is old but mine just wobbles about or acts like it's doing the downward dog
@Archiewhitehead9 жыл бұрын
Awesome Tutorial! Thanks! However, i'm running into an issue, whenever i get some air, my vehicle basically floats. Whenever the line trace is in contact with the ground the vehicle behaves really nicely, but as soon as it's no longer touching i get this weird floaty car. It seems the cube's physics don't actually do anything. any ideas how to remedy this?
@Unain9 жыл бұрын
+Archie Whitehead It's the Linear Damping. You have to check if you're on the ground -> check if 1 or more tracelines from the hover components are hitting the ground. If none of them are hitting the ground, set the Linear Damping to the default setting 0.1 I think it was :).
@Archiewhitehead9 жыл бұрын
+Unain Thanks for replying i really appreciate it! What node setup would i use to check the tracelines separately? I tried using the False output from the branch in the HoverComponent, however that seems to fire whenever one trace is not touching, making the vehicle handling very slippery. Thanks again for a great tutorial and helping me out :) I should add i'm using this for a wipeout/fzero type project, so the vehicle is traveling very fast!
@Unain9 жыл бұрын
Archie Whitehead You should combine all the traces into one function (which returns a boolean) so that you can check if all tracelines are touching or not.
@Archiewhitehead9 жыл бұрын
+Unain it works, thanks, not slippery unless i bank servery (banking influences the roll(?) of the vehicle meaning it loses trace contact with the ground sometimes. However reducing the linear dampening means that getting air results in the vehicle flying off into the distance with incredible force, thanks for your time, obviously i don't expect you to figure out a solution, I'll keep working on it and see what i can think up.
@thomasrobin81382 жыл бұрын
@@Archiewhitehead Hi ! I have the same problem ... Did you find a solution when the car is in the air ? :(
@grimm-et6gh6 жыл бұрын
hi, unain. i tried to apply this tut to a skeletal mesh i built but it never work. ( a hovering drone ) think i miss something in the process, maybe skeletal should be done another way ?
@luftbauch43609 жыл бұрын
Nice tutorial, ty for that. I am stuck in applying a local force on local actor x axis. through Apply force or apply force at location, but not with actor transform. Can you extend your tutorial with that please? I do not use a pawn bp, only actor bp, jump on it and control it with simple collisionboxes for now.
@jayadams33398 жыл бұрын
Got this working but turning still has a bug. Works fine IF forward force is applied, But if you are stationary and you turn then the craft will jiggle back and forth a little gaining momentum, then turn in the wrong direction
@Visceral3D9 жыл бұрын
I dont really understand i have done everything and im pushing 9million in hoverforce and my vehicle still just falls straight down. I can see the the lines and everything but it dosnt seem to be pushing it up enough.
@Visceral3D9 жыл бұрын
Visceral3D Nevermind, i got a case of the dumb...forgot to run the init event.
@Unain9 жыл бұрын
Visceral3D Glad you got it working ;).
@pulkitpunea27454 жыл бұрын
how to add force lower to center of mesh ?
@koaku77749 жыл бұрын
my problem is when i try to turn on the spot it turns in the direction for 3 seconds then starts trying to go back in the opposite direction
@grimmrobe2206 жыл бұрын
Having followed this video. My object never actually stabilises. It wobbles around indefinitely. Or in certain instances glitches out entirely. It’s almost like the 4 hover points get themselves out of sync. Additionally I can’t get it to work without having to set the mass which I’m guessing came from an engine update. Anybody else had / fixed these issues?
@youtubewontletmelogoutofyo88457 жыл бұрын
Tutorial is great, but I want my hovercar to do two things specifically: 1. having the hovercar to turn right and/or left spinning on the spot without the car stopping midway through. (when trying to do a 360 turn on the spot, the car jitters and sometimes moves to the right at time, its never a continuous motion.) 2. for the left and right controls to be seperate from the front and back controls. (Whenever my hovercar has moved forward (w), the car turns left (A) and right (D) when pressed, but when my hover car has moved backwards (s) , the car turns right when pressing (A) when it should have turned left, and vice versa the other way.) Any Reasons why this is happening and how this can be fixed?. Also using 4.9 as the engine version.
@chijunky61455 жыл бұрын
1) That is caused by the silly code in the TurnLeft event, that selects a float based on forward velocity. If the car is neither moving greater or less than 0, then it multiplies the turn speed by 0, so no turning. Try removing it and checking if the back/s key is down, and multiplying turn speed by -1 if it is, else do nothing. 2) It looks like you hooked up the MoveForward event to both the add force node, and the add torque node. You need to have one event (Move Forward) that is hooked up only to the AddForce node, and one event (TurnLeft) that is only hooked up to the add torque node.
@asdvdsasdcvxghgf5557 жыл бұрын
Hi, i need my hovercar to be able to go upside down and on walls inside tunnels without flipping out, how would i achieve this if i followed this tutorial?
@indieartsmidwest40426 жыл бұрын
Maybe combine this tutorial with a wall crawler tutorial.
@davidpeters57136 жыл бұрын
Having lots of issues in 4.19.2 - Can't find a balance of vertical force.. the car either sinks to the ground or floats into the sky.. and when forward input is applied, it just somersaults around its Y axis.. Will post a fix if I find one!
@davidpeters57136 жыл бұрын
Ok-the HoverComponents weren't children of the car mesh. Very important! I originally had them as children, but by dragging them onto the car mesh (to be doubly sure that they were children) actually *un-parented* the car mesh.
@777deathgod7777 жыл бұрын
Great tutorial, this is going to help alot for my big project. I'm encountering a problem where when I accelerate forward, the box gets closer to the ground as I move forward, when I reverse it gets further from the ground flying up. When I keep moving forward until it hits the ground it falls forward, when I reverse the box stays on its same axis and reverses up into the air. Gravity is on, so why isn't it effecting the vehicle?
@chijunky61455 жыл бұрын
Your center of mass on the cube is probably too low. Set it to a value closer to 0.
@ElGorro89 жыл бұрын
Awesome tutorial, thanks so much for putting it together Unain! I'm having just one issue, when my Hovercar Pawn spawns, if I hold A/D, it'll either jitter and go in the wrong direction or jitter in place. Do you know what could have gone wrong there?
@Unain9 жыл бұрын
+Barbossal I would re-check the part from 20:21 onward and see if there is anything different in your Input Axis MoveRight event chain. Also, make sure that your force is high enough (the big number 2.000.000). If you have a bigger car (more mass) it might need more force to be pushed in the right direction. Does it work if you just do the part from 20:21 to 21:38 ?
@ElGorro89 жыл бұрын
+Unain Okay, I rebuilt the turn section, and it works up until I add in the Get Physics Linear Velocity. The Car seems to have the issue ONLY when the velocity is in the decimals around zero (ie 00.023 or -00.44). Seems like its an issue when the number is between 1 and -1.
@davidlopez178 жыл бұрын
Nice tutorial, one question all forces are local and not global coordinates system, locations are in global?
@sankofa_tattoo7 жыл бұрын
hi there , i did import a fbx and tried to follow along your video to add everything up , but just things are missing on my mesh is that I don't have the pawn option on the object panel. How could I transform that static mesh into a pawn that i could possec ?
@asadtrash94076 жыл бұрын
Pawns are not static meshes, you need to create a blueprint class which is pawn, if you add a blueprint a menu should appear and it will tell you to create a blueprint of which class , pawn , actor , character and so on
@Zombie4206 жыл бұрын
having an issue, it works but when i start going it starts flying, any idea how to fix?
@MonstroUK8 жыл бұрын
I'm running into issues at the linear and angular damping phase, I can't compile the blueprint without adding something to the target inputs but nothing wants to attach!
@MonstroUK8 жыл бұрын
My bad, there were two Linear and Angular Damping nodes in the contextual menu. I was using the physics handle components ones.
@GloomyCat857 жыл бұрын
sigh I adjusted all I could.. mesh mass.. force... on bsp it works cool... but spline mesh... 0.... it start messing around...
@krustykraken93316 жыл бұрын
Thanks for the update for UE4.9! Nice tutorial. It would help if you went slower in areas when you're clicking stuff, maybe adding a slow-motion and zoom in, but I guess that would take a lot of time to do. Still, it really helped me a lot! Thanks!
@MrPangahas7 жыл бұрын
How do you adjust the drifting/handling of the hovering?say I want one that handles better and drifts less and another that has less control/handling?
@DankLordvsGames7 жыл бұрын
Make a duplicate of the scene components, the thing you put under the car to make it hover - and make one with different settings. Attach that to the different "car" and you're done..
@chijunky61455 жыл бұрын
One way to do it is to calculate the velocity of the cube to the left/right, get the RightVector and add force to the cube equal to the right vector divided by a bit or multiplied by a bit. This basically checks how much the car is drifting, then adds a force in the opposite direction to counter it. If you want one that controls less, then you could set the linear and angular damping values lower, in the hovercomponents. You could have each hovercomponent use a float variable for these things, which you can then set to be instance editable, so you can adjust each wheel on each car to have different handling.
@bluestormguy658 жыл бұрын
10:35 the hit "result" wont connect to the "out hits" 4.12.5
@Unain8 жыл бұрын
No idea what you mean by that. Did you break the out hit as shown in the video? Link a picture with what you are trying to do.
@bluestormguy658 жыл бұрын
I'll send it when I get home, but the breaking wasn't working, saying it wasn't the same.
@bluestormguy658 жыл бұрын
After re- doing it, it worked. I probably messed up, thankyou! subscribed
@Unain8 жыл бұрын
Good to know! :)
@yami70469 жыл бұрын
Thank You Very Much !!! But i have a question, is it possible : set visibillity at OFF on The HoverComponents because it's not very nice ?? ... ^^
@Unain9 жыл бұрын
Yami You mean the red lines coming from the bottom ingame? Those are the line trace, just set the Draw Debug Type to None :).
@yami70469 жыл бұрын
Where I can set the "Draw Debug type" ?
@Unain9 жыл бұрын
Yami It's on the Single Line Trace by Channel node in HoverComponent.
@yami70469 жыл бұрын
thanks man !
@youlikeicecream8 жыл бұрын
Any suggestions for how to add simple wheels into the suspension system ?
@cosminandrei20474 жыл бұрын
How to add automatic gearbox, with sound, RPM and HUD.. I know to make a HUD, but idk how to sync with RPM, If someone can show me a tutorial, a advice ! Please !
@jigsaw00738 жыл бұрын
Does this not work with a "skeletal mesh"? When I import my FBX of the hover craft I made, I end up with Skeletal Mesh that has animations. Do I need to only use a "static mesh"? Thank you for the great tutorial!
@chijunky61455 жыл бұрын
You should have both a static mesh (this cube) and a skeletal mesh. The static mesh (cube) is set to invisible, and is basically the collision box. The Skeletal Mesh is set to visible, and just parented to the cube, and all collision is set to off for it. In this way, you're doing exactly what is in the video, but tying a static mesh to the now invisible cube, so the player thinks that the skeletal mesh is accelerating while it's really the static one, tied to the skeletal.
@SpiritowlTV7 жыл бұрын
imgur.com/a/p4Rx4 basic fix to the issue with the rotation: 1) Physics Normalize: Basically a huge number so that the values I put into the physics don't have to have soooo many zeros behind it. 2) Sub: (the car mesh) 3) Making the car flip it's turn direction based on the input of the forward movement.
@nnarcus Жыл бұрын
Hey! Thanks a lot, the picture and your explanation is very helpful for a beginner like me
@MrRafae19 жыл бұрын
I have a tons of issues trying to do this in 4.9.. :( "Accessed none "Parent Component" from node (everything) in EventGraph in blueprint "HoverComponent"
@EnricoUniverse9 жыл бұрын
+MrRafae1 Same issue here.
@travispierce98869 жыл бұрын
+MrRafae1 did you ever get a handle on this?
@MrRafae19 жыл бұрын
+Travis Pierce I'm afraid not. I've worked around it.
@Unain9 жыл бұрын
+MrRafae1 Make sure your hovercomponent InitComponent looks like this: i.imgur.com/5vVXJZo.png Then remake Add Force At Location (uncheck context sensitive if you can't find it) then add the ParentComponent to the target, see: i.imgur.com/GJBzc0Z.png
@cabelovlie7848 жыл бұрын
+Unain Hi, I am having the exact same issue as MrRafae1, and followed the instructions you've given (I believe to a T) and still am having the issue.
@anotherfool92786 жыл бұрын
My hover car is moving sideways when I press for it go forward. How do I fix this?
@chijunky61455 жыл бұрын
You either messed up in setting the inputs in project settings, or you're using a Get Left Vector instead of Get Forward Vector, or you may have hooked up the force to the Y value in Add Force node, instead of the X value.
@AGCreationsflorida8 жыл бұрын
Hey how would I go about being able to switch from the hovering bp to a fps character? like getting in and out of a vehicle? a link or anything would help alot please
@MightyTyphoon8 жыл бұрын
So I applied this to a custom mesh that I made and while the hover component works, I can't get it to move forward or turn even though I didn't get any errors when I compiled the axis events. Is there an extra step for imported meshes that i'm missing?
@Unain8 жыл бұрын
+MightyTyphoon Maybe your custom mesh is really heavy, so you need more force applied for it to move forward/turn?
@MightyTyphoon8 жыл бұрын
+Unain Welp, that worked. Now I feel dumb for not thinking of that ha ha. Thanks for that though.
@Unain8 жыл бұрын
MightyTyphoon No problem :).
@Kevin-yh8ol8 жыл бұрын
Nice video! I have one question, how do you tip the car forward, backwards, left and right when accelerating and/or turning?
@chijunky61455 жыл бұрын
So, instead of doing an add force node for forward/backward, use an AddForceAtLocation node instead. For the input location, use the cube's world location, split the vector and subtract around 20 or 30 from the Z, then make the vector again and plug it into the AddForceAtLocation node. This will add force to a lower part of the cube, making the car tilt forward/backward during accelerations. As for the turning, the best I could figure was either making the cube invisible, parenting a skeletal mesh to it that then rotates left/right in an animation, when left/right keys are pushed. OR in the add torque node, hook up the torque force float to the x value aswell as the z value, but not the Y value. You may need to multiply or divide the value going into the x, though, if it's too weak/strong, or multiply by -1 if the car leans the wrong direction when turning.
@samuelcresswell87198 жыл бұрын
mine jump keeps spinning and bounces. any reason why?
@Archiewhitehead9 жыл бұрын
Hey man, any idea exactly what to change to make another hover component that will push the vehicle away from a ceiling?
@Unain9 жыл бұрын
+Archie Whitehead Add another Hover Component and make that component point upwards with the red arrow. Make sure the trace length on it is a bit bigger and tweak the force number.
@lvl99paint7 жыл бұрын
How would one control the acceleration the the vehicle with AddForce? Currently mine just accelerates and decelerates way to quickly. Great video btw.
@chijunky61455 жыл бұрын
You could make a timeline that plays from start when the player presses w/s, the timeline goes from 0 to 1, over say... 3-4 seconds, and then you take the output float and hook it up to a lerp, with A being your max accelerated speed, and B being 0. Hook the output float from the timeline to the Alpha of the lerp, and the result of the lerp to the Add Force node. In this way, you can ramp up the acceleration force from 0 to whatever, based on a time (the length of the timeline.) If you want to adjust individual cars' acceleration speeds, as in the length of the timeline, you can either set the start point of the timeline to a value closer to the end value (eg if the timeline is 3 seconds long, set the start value to 1.5), or you can set the play speed of the timeline by right clicking and typing in the name of your timeline, then dragging off of the node and doing a set play speed node.
@foolserrand62619 жыл бұрын
How would we go about preventing the vehicle from turning without moving forwards first?
@Unain9 жыл бұрын
+StealThyPie at 22:50 I do a dot product of the physics movement forward which gives you a float value (this is your current forward speed). Just check if that number is > a certain speed (1 for full speed, 0 for stop, -1 for full backwards speed), and if that's true then apply the torque. Otherwise don't apply the torque.
@foolserrand62619 жыл бұрын
+Unain Ah! Thank you for the quick response, I really appreciate it.
@shadow795646 жыл бұрын
how do you get this to not float in mid-air
@messyroom99044 жыл бұрын
I made something similar in unity as an experiment. It went a little beyond a traditional raycast wheels tho.
@souvikbanerjee92197 жыл бұрын
How can I use this to hover a skeletal mesh?
@DigitalLoom5 жыл бұрын
Im so stressed out this is the perfect video i need but when following to the t..... i dont get the same options in my popset simulate physics wont even show up and cast to primitive as well...!! im using 4.18.
@adamchaggama66148 жыл бұрын
Hi i've followed your tutorial step by step and when i press begin play the mesh flyes at a high speed off the map instead of hovering in place.
@adamchaggama66148 жыл бұрын
also does this with any other tutorial ive followed on hovering
@ChrisBPacheco8 жыл бұрын
Let me know if this was fixed. Same issue
@jayadams33398 жыл бұрын
Having the same issue 4.14.2
@jayadams33398 жыл бұрын
One thing I noticed is when I use the player in the game to start I can see the line traces off the hover, but they go to a point WAYYYY out front of the car. So I decided to redo entire tut carefully and I have the car set up properly, it doesn't spin away. But at 16:01 when he goes in game the car bounces. I have the line traces and get cubes on the end if it's in range of ground (
@jayadams33398 жыл бұрын
Whoops: had event actor overlap to start... One difference in 4.14 is that when you drag out the init component from event begin play the target is just hover component, and a 'get' component# is dragged out with it.
@person82039 жыл бұрын
is there any noticeable performance impact using blueprints instead of code?
@DevTechSpectrum9 жыл бұрын
+person8203 Blueprint is slower, C++ is faster.
@graywoodforge9 жыл бұрын
+SoulSpectrum How is it slower? Blueprints are compiled into machine code just as C++ is.
@DevTechSpectrum9 жыл бұрын
graywoodforge Old comment, it was later confirmed that the two run the same but its faster to compile BP because its interpreted at run then while C++ required you to compile before its ran and may take awhile depending on your PC. In a nutshell, the two are fine in performance but C++ allows you to do more with the game and engine.
@person82039 жыл бұрын
SoulSpectrum I thought bp ran on a virtual machine at runtime, is that what you meant by interpreted? There's a fairly recent vid on unreals channel where one of the senior programmers gives quite a good explanation. Basically he said bp performance fluctuates depending on how you're using it but will typically be around 10 times slower than c++ (assuming it's not spaghetti), give or take. In real terms though it doesn't seem to be noticeable. Would you say that's still fairly accurate?
@erikm97688 жыл бұрын
Wow. thank you so much for taking the time to make this tutorial, i'm making a jet ski game, but this will be great reference!! Thank you so much!
@bentripn5 жыл бұрын
This was extremely helpful for my current project. Thank you very much!
@christianheisch84726 жыл бұрын
You saved my day. Thank you for this great tutorial. It really helped me a lot.
@DevGods4 жыл бұрын
Man I’ve been looking for this! Gonna try to implement in C++ thank you for making this. M
@_chaoshunterz_94978 жыл бұрын
i don´t understand why i can only move sidewards instead of back and forward
@svenrawandreloaded7 жыл бұрын
>sidewards
@erikm97688 жыл бұрын
One question, how come you are using Add force rather than Add impulse?? I've found that Add impulse more often does what i want , still don't full understand when we need to use Add force
@Unain8 жыл бұрын
+blackmagic x docs.unrealengine.com/latest/INT/BlueprintAPI/Physics/index.html Add Force: "Add a force to a single rigid body. This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force. Target is Primitive Component" Add Impulse: "Add an impulse to a single rigid body. Good for one time instant burst. Target is Primitive Component" It might have to do with optimization ;).
@erikm97688 жыл бұрын
I ended up using Add impulse. Even calling every frame for the duration I dont think Add force acts as smoothly as continuously calling Add impulse. One thing to be careful though is that Add impulse requires delta time while Add force does not.
@Unain8 жыл бұрын
blackmagic x Ori Cohen from Epic had this to say about it: "Functions like AddForce are framerate independent. When you apply a force of 10 on an object with mass 1, the object will experience an acceleration of 10 cm/s^2 for the duration of the frame. This means if the frame took 3 seconds, the final velocity will be 30 cm/s. If the frame took 2 seconds the final velocity would be 20 cm/s Typically forces are applied over multiple frames for some period of time, and so this is what you want since applying a force for 3 seconds should produce the same change in velocity regardless of the frame rate. An impulse allows you to change velocity instantaneously. You can think of this as a force applied over some period of time. An example of this may be that an object is pushed on for exactly 0.5 seconds. In this case if you applied a force you would not get the correct result unless the frame rate happened to be exactly 0.5 seconds. So in this case you can calculate the impulse as 0.5s * (the force you'd apply) and PhysX will change the velocity accordingly." So the safer way is to go with AddForce, because its framerate independent :).
@erikm97688 жыл бұрын
Hmm...well i dont know which is better. To be honest i think they are identical except you need to multiply by delta time for Add Impulse, which is not a hard thing to do. I understand better how Add Impulse works so its easier to work with it.
@Unain8 жыл бұрын
blackmagic x Add Force is the same as Add Impulse without the delta time, because it gets the delta time from the engine directly. This makes it frame independent (which is something you always want, because people have faster/slower computer and you want all physics to be the same for everyone). But just keep it Add Impulse for now and work on the more fun parts of your game, when you get better at it you'll know how it works ;).
@gecron9 жыл бұрын
Amazing tutorial, exactly what i was looking for. Thank you very much!! Keep making more please! :)
@ricopacoo9 жыл бұрын
Thanks for the tutorial, but I'm having a problem.. when i apply a forward force to the mesh it tilts forward a lot, i can solve this by increasing the angular damping but i have to increase it a lot.. 20 or something.. and the car is very rigid after that.. same happens going backwards.. I'm not specifying any location is the regular add force function.. thanks for the tutorial they are very useful.. forgot to tell you i'm using 4.9 version
@Unain9 жыл бұрын
+Giovanni Elgert Did you set your Center of Mass offset to a lower point (@ 26:24)? Go to your static mesh and in the Physics Tab there is a little arrow at the bottom (advanced Physics settings). In that tab set your Center of Mass Offset Z value to about -40. You might have to tweak this value depending on the object you're using (and how heavy it is).
@ricopacoo9 жыл бұрын
+Unain Well, I tried to do it on another machine and it works great.. i really dont know what happened but i can go on now.. thanks!
@Unain9 жыл бұрын
Giovanni Elgert Weird, glad it worked :).
@ricopacoo9 жыл бұрын
+Unain Thanks :) I've created a question on the forums explaining this to see if anyone knows whats happening.. if you want to follow up here is the link answers.unrealengine.com/questions/356098/different-physics-on-different-machines.html
@ahmetcetinkaya65658 жыл бұрын
I have that same problem. I think, it can be solved with "project vector on to plane"
@CaelAnim8ter9 жыл бұрын
How can i make a character hop ontop of it, without the vehicle sinking to the ground?
@Unain9 жыл бұрын
+Caelan Reid You need to add more force to the components. Hover Force is the variable you want to increase.
@CaelAnim8ter9 жыл бұрын
+Unain Nope, i just put it to the maximum value that can fit in the box 99999997952.0 .. I realize i could multiply it. But isn't there a way to reduce the mass acting on it by the weight of the player? (I tryed reducing the mass on the player, that still didn't work) Anyone else able to get a player ontop of it without it sinking?
@CaelAnim8ter9 жыл бұрын
+Unain Actually I just figured it out, YOu want to adjust max depentration, to make it not sink to the ground :D :D :D
@Unain9 жыл бұрын
Caelan Reid Nice work :).
@MonstroUK8 жыл бұрын
Ok so I have everything up and running from the tutorial. Many thanks for that! I have two main problems now though however. 1) After turning on the spot for a period of time, the vehicle stops turning unless forward or reverse are also pressed. 2) The vehicle gets very unstable and 'falls over' if i bump into any physics objects or even hover over them. Do you have any suggestions?
@ledgarl8 жыл бұрын
I have de same problem, how to solve this?
@Avi3ator8 жыл бұрын
a car cant turn without moving forwards or backwards...
@ledgarl8 жыл бұрын
This happens when it is in the air, so the car comes with a strong impulse, it is abruptly stopped
@asadtrash94076 жыл бұрын
1) Probably has to do with the torque value, it is the only thing i can think of. 2) Try lowering your center of mass in your static mesh, higher means more unstable hoovering and flipping over hoovering, lower values make it more stable. If you can't pass through an object and the center of mass is not the cause change the RayTrace length that your components emits (so it hoovers higher). Hope this helps!
@chijunky61455 жыл бұрын
So for anyone reading this now: 1) When determining whether the car should turn left/right based on forward velocity being > 0, if the velocity is neither more nor less than 0, as in if the car is stopped, then the car's turning speed is multiplied by 0. So, if you remove the complicated code that checks the cube's forward velocity and selects a float, making sure it doesn't multiply with the normal turn torque float, then the car will always turn regardless of whether it's stopped or not. However, now you need to determine another way of inverting turn direction when going backwards, this can be done by just checking the input axis value of the event that moves the car forward, if input float is less than 0, then multiply turn rate by -1. You can leave the false option blank, on the branch. This basically does: "If the player is pressing the back key, then invert turn direction." 2) Try setting the center of mass lower, and implementing a button, say 'f', that when you press it it applies around 600000 torque in degrees to the cube, on the x axis. This will let the player flip their car, if it tips over.
@mattli9119 жыл бұрын
Awesome!! I'll have to watch this again and follow along. Very cool! I tried to do this myself yesterday, before seeing this video, and I have something kind of working, but it's not stable enough, ect. Thanks!!!
@xewi609 жыл бұрын
omg , that's exactly what i need, if i could press the like button 10000 times i would do it
@ue4_questions4709 жыл бұрын
Amazing tutorial. I followed it and works like a charm. I'd just like to know how to make the car tip forwards and backwards when braking and accelerating. I tried doing it like you explained here but I, for the life of me, cannot get it to work. Would appreciate a reply. Keep making awesome videos.
@Unain9 жыл бұрын
+UE4_questions If you set the Center of Mass Offset a little lower and a little more forward you will automatically get it to tip forwards/backwards when moving. Center of Mass Offset is located in the Physics Tab advanced section (click the little arrow at the bottom of the Physics tab). The tougher the suspension the less it will tip though, keep that in mind :).
@ue4_questions4709 жыл бұрын
My center of mass is lowered and slightly forward. I should note my cube scale is 4 3 1 and not 1 0.8 0.4 as in your tutorial (if I remember correctly). I have had to add more forces to my cube as a result. Could this affect the tipping of it? Thanks again for this amazing tutorial
@ue4_questions4709 жыл бұрын
+UE4_questions One side note now that i have tested this my car seems to slam into something invisible and fly into the air. I have no idea what is up with that
@ty_teynium6 жыл бұрын
Hello. First time viewing one of your tutorials and I liked to request a tutorial for a simple game at point system. By this I mean marking a point as a destination for the character to go to.
@TorQueMoD9 жыл бұрын
Awesome tutorial! Thanks so much for figuring this out!
@twintek1099 Жыл бұрын
Movement doesn't work anymore in 5.1.
@Unain Жыл бұрын
Try Marco's Tutorial here: kzbin.info/www/bejne/oaCZnXeJiLObjJo This tutorial is really old at this point.
@twintek1099 Жыл бұрын
@@Unain kk
@twintek1099 Жыл бұрын
i don't know why i am complaining about a video made 7 years ago using old software lol.
@Unain Жыл бұрын
@@twintek1099 Hehe, personally I would use the UE5 vehicle system for stuff like this now: docs.unrealengine.com/5.0/en-US/vehicles-in-unreal-engine/
@TheWarrior4419 жыл бұрын
im having trouble ,it not floating
@SnoozeIRTL9 жыл бұрын
I did exactly what you did, and I redid it twice, and It's saying "'Mesh Component' is already a 'Static Mesh Component', so you don't need to Cast to Primitive component." I continued without it and it made the function fail, so I added it back in and it still wont let me. I made a new HoverComponent and started all over and I'm getting the same results. Cue "welcome to the wonderful world of coding, kid"
@Amira26439 жыл бұрын
+SnoozeIRTL it dosent matter if u add it or not make sure to add the ParentComponent to the Force , Linear/Angular Damping Target and it works
@travispierce98869 жыл бұрын
+sima andrei you're a lifesaver!!
@travispierce98869 жыл бұрын
+sima andrei I lied. Now it's popping up telling me "Error Accessed None 'ParentComponent' from node Add Force at Location in graph 'EventGraph' in blueprint HoverComponent"
@Unain9 жыл бұрын
+Travis Pierce Remake the Add Force At Location by dragging from the ParentComponent in your HoverComponent blueprint. It should look like this: i.imgur.com/GJBzc0Z.png
@travispierce98869 жыл бұрын
So crazy how the little things like that work.. Ha! Thank you so much for all of this, man!!!
@jefffsfff17837 жыл бұрын
Question: Is all this blueprint stuff supposed to be common sense and I'm dumb, or is it common to find this very complicated?
@indieartsmidwest40426 жыл бұрын
After a while you'll start conjuring up your own style of blueprints based on references you've seen online or from previous tutorials. I usually take a bunch of screenshots so I don't have to reopen a uproject.
@Unain9 жыл бұрын
Can't reply to you directly Lewin, but if you make it so that you only are able to apply forward force when you have at least 1 wheel on the ground, you won't take off :).
@EnigmaGameMaster9 жыл бұрын
+Unain For me, it's not smooth at all and the car doesn't fall normally when going off a ledge. It feels like the friction with the air is insanely high.
@Unain9 жыл бұрын
+Enigma That's the linear damping. You could make it so if you're in the air (no tracelines are hitting the floor) that the linear damping = 0.01 (no friction in the air). It is possible to make the vehicle hover without changing the linear damping, but that requires a lot more math.
@EnigmaGameMaster9 жыл бұрын
***** Thanks! So I suppose I just play around in the "false" output instead of the "true" and add a linear dampling modifier on both so that it sets the settings accordingly?
@Unain9 жыл бұрын
Enigma Yep, but that would check only 1 wheel, so you might need to set a boolean that you can check in your vehicle blueprint to see if all 4 wheels are off the ground :).
@EnigmaGameMaster9 жыл бұрын
***** Will do. I really like Unreal Engine, I'm just starting to learn how it works, but coming from Unity, I can say it's much easier to work with and the graphics are amazing! Thanks for the help and the tutorials! :D
@chwanpang47508 жыл бұрын
How do I stop my shaders from messing up
@chwanpang47508 жыл бұрын
I got problems with any object
@error_50268 жыл бұрын
hey i cant get init component to show up.
@error_50268 жыл бұрын
i solved it type in what ever you named the scene component other than init component and it should pull it up.
@svens372211 ай бұрын
if someone have problems for me was addin a physic material to the mesh the solution
@jonaskorte68737 жыл бұрын
It just falls to the ground!! Please help me!
@jonaskorte68737 жыл бұрын
Fixed it! Connected The HoverF (Hover Force) variable to alpha and the other in a with the lerp!!