Drive Your Boat - Boat Vehicle Tutorial for Unreal Engine 5.3

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น •

  • @arezgod14
    @arezgod14 9 หลายเดือนก่อน +2

    Thank you for this video, I've been waiting for it for a whole year, don't stop, will you make a tutorial on how to build a rowing boat or a sailing boat?

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน +2

      Hey thanks for watching, at some point I hope I can work less and do more of this. I like the idea of applying wind mechanics!

    • @nobrainerrgames
      @nobrainerrgames 6 หลายเดือนก่อน

      hey man, he did the tutorial on sailing boat month after you've asked- giving you a shout in case you've missed it th-cam.com/video/Igg7PGR6jIk/w-d-xo.html

  • @edh3268
    @edh3268 7 วันที่ผ่านมา

    Thank you for the video! Very helpful getting us all started. Would love to know more about the "Why" certain choices of programing logic and nodes to use as we do it.

    • @peanut_games
      @peanut_games  7 วันที่ผ่านมา

      @@edh3268 Thanks for watching, I try to if something stands out to me. Maybe some things I take for granted but it's been so long since, what questions do you have?

  • @ItayHa-zx9dw
    @ItayHa-zx9dw 9 หลายเดือนก่อน +1

    Hi, at the start after finishing the first part of the BP the print string doesn't do anything and I checked everything.
    You know how to fix this?

  • @-JimRice-
    @-JimRice- 9 หลายเดือนก่อน

    Thank you sir! Ive been having problem making my boat controls work for weeks, and ended up giving up for a while. This executes perfectly! Thank you!

  • @p.m3204
    @p.m3204 4 หลายเดือนก่อน +1

    you're litreally the one channel i need to make my game rn lol

    • @peanut_games
      @peanut_games  4 หลายเดือนก่อน

      Nice, glad I'm doing something different

  • @muralist1
    @muralist1 10 หลายเดือนก่อน +1

    Looking forward to trying this.

  • @King_Ghanem
    @King_Ghanem 3 วันที่ผ่านมา

    can you show me how i make character sitting on the boat

  • @Parsifal308
    @Parsifal308 9 หลายเดือนก่อน +1

    So what does the "Set Actor Enable Collision" node actually do? When I get out of the boat my character becomes Yisus and walks on the water xd
    I can't find a way to get back to the behavior it had before entering the boat :c

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน +1

      It should just toggle collision on the actor. Maybe try adding a 'Set Collision Profile Name' node with your character capsule's default collision profile on exit. Detach from Actor first.

    • @Parsifal308
      @Parsifal308 9 หลายเดือนก่อน

      @@peanut_games :D thank you!! i was finally able to solve it that way. i will name my son Peanut in your honor my brother T.T

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน +1

      ​@@Parsifal308 I would expect nothing less

  • @Rawrlawlsaws
    @Rawrlawlsaws 5 หลายเดือนก่อน

    Lovely content!

  • @Psikais
    @Psikais 6 หลายเดือนก่อน

    Thank You! Amazing tutorial!

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      Thank you :)

  • @Sonofmanstudio
    @Sonofmanstudio 9 หลายเดือนก่อน

    Keep up with the good work.

  • @TheWeeky
    @TheWeeky 2 หลายเดือนก่อน

    In my case the boat and it's movement is a separate BP_Boat that i made, if anyone elses boat is not moving at least in a similar setup click on the BP_Boat or whatever you named it and go into the details panel and search for Input, a setting called Auto Receive Input was set to Disabled for me and the boat didn't move, i set it to Player 0 and now it works

  • @ВладиславЛебедев-х5д
    @ВладиславЛебедев-х5д 6 หลายเดือนก่อน

    Thank you for a such good tutorial!!! How about third person view when controlling boat,with opportunity to switch first person and control boat manually(like every button and lever)

  • @HotSadist
    @HotSadist 3 หลายเดือนก่อน

    Hello, I have everything exactly the same but my boat only turns to the right and to the left, no force is exerted forward or backward.

    • @peanut_games
      @peanut_games  3 หลายเดือนก่อน

      Is this 5.4?

    • @peanut_games
      @peanut_games  3 หลายเดือนก่อน +1

      A couple people have said the same thing, it makes no sense and I haven't heard a solution. I know 5.4 has some weird physics bugs that I've run into, but this still works for me there. Still, maybe 5.5 will fix it. If these nodes just won't work you could try using a Physics Thruster component. It only has one force value so you'd need one for forward and one for backward ( it won't seem to accept negative thrust so you can rotate it 180 degrees in the viewport ), using the Activate and Deactivate functions.

    • @HotSadist
      @HotSadist 3 หลายเดือนก่อน

      @@peanut_games YES 5.4

  • @test14078
    @test14078 7 หลายเดือนก่อน

    Excellent tutorial, thank you, one question: is there a way to set up a boat to turn left right with the mouse movement, I mean I press W to go forward and with mouse give a direction/rotation, like with the character input? Thx

    • @peanut_games
      @peanut_games  7 หลายเดือนก่อน +1

      100%, I'd probably use tick event. Just check that the boat's 'get actor rotation' equals the player's 'get control rotation', if false then add torque on the smaller angle until it does.

  • @Jordan-Tech
    @Jordan-Tech 2 หลายเดือนก่อน

    How would we do if we have multiple boats ? do we need to create multiple variables?

    • @peanut_games
      @peanut_games  2 หลายเดือนก่อน

      no it'll work as it is

    • @Jordan-Tech
      @Jordan-Tech 2 หลายเดือนก่อน

      @@peanut_games I tried to add a new boat (new model) but in BP_thirdCharacter we add a Boat var.. so how the BP will know about the second boat without a new variable ? I tried to create a parent Class (BP_BaseBoat) and put the BP_boats as children but It didn't work..)
      (BP_Boat1 has it's own mesh) BP_Boat2 has also it's own mesh.. but BP_Player only call BP_Boat1..
      (btw, thank you for this tutorial and the others :))

    • @peanut_games
      @peanut_games  2 หลายเดือนก่อน +1

      @@Jordan-Tech Do the reverse, make a child of the first boat

  • @Mannkrieg
    @Mannkrieg 2 หลายเดือนก่อน

    Hey, this tutorial series around Buoyancy is really halpful! I got a small problem tho. When I move around with the boat for a while then the camera slowly moves. You don't really notice it because it's always small amounts but agter a while the camera is at a completely differen location than it was at the beginning. You got any idea on how to fix that?

    • @Mannkrieg
      @Mannkrieg 2 หลายเดือนก่อน

      I fixed it! I used the Event Tick and set the Actor Location and Rotation to the Location and Rotation of the Socket.

    • @peanut_games
      @peanut_games  2 หลายเดือนก่อน +1

      @@Mannkrieg That works, although why it was happening I'm not sure. Attach should do the same thing 🤔

    • @Mannkrieg
      @Mannkrieg 2 หลายเดือนก่อน

      @@peanut_games I also couldn't find anything about this bug online. Still ty for the tutorial :)

  • @test14078
    @test14078 7 หลายเดือนก่อน

    Please advise how to make the boat float only on water and stop on the shore.

    • @peanut_games
      @peanut_games  7 หลายเดือนก่อน +1

      Mine did that naturally, depending on the mesh you may have to play with the weight and set the physical material to have more friction... the buoyancy component also has a function "Is In Water" so you could just pass movement through that condition

  • @jawadboutahar7552
    @jawadboutahar7552 6 หลายเดือนก่อน

    Thanks for tutotial. Is there anyway to change cam ? like when entering boat it change the view to 3th person ?

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      yep just as you normally would with a spring arm, set up another camera and use 'Set View Target With Blend'

    • @jawadboutahar7552
      @jawadboutahar7552 6 หลายเดือนก่อน

      @@peanut_games For a third person game is it best to use an actor or pawn for the boat ?

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      @@jawadboutahar7552 Is this a game in which the player is always a boat like Shipwreckers? If so you could probably use pawn if pawn does not have a capsule, I don't recall.

    • @jawadboutahar7552
      @jawadboutahar7552 6 หลายเดือนก่อน

      @@peanut_games No, a game like backflag. So actor then

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      @@jawadboutahar7552 yep

  • @zeon3d755
    @zeon3d755 6 หลายเดือนก่อน

    When I stand on the back of the boat, boat won't move? If I move forward against boat edge collision, it can stop the boat as well. I disabled cahr movement physic interaction. But still having issue

    • @nobrainerrgames
      @nobrainerrgames 6 หลายเดือนก่อน

      did you create the socket in boat's socket manager and made sure your pawn will be attached to it while mounted bro?

  • @sensi2fr
    @sensi2fr 7 หลายเดือนก่อน

    Thank you for the tutorial! :) I would be interested to know the best practice on how to reformat all that logic efficiently and in a generic / reusable way in order to be able to use it with several different blueprints / meshes (ex in my test map i have a boat and a jetski, and i may want to add more), as trying to just duplicate the logic and change the mesh object is quickly cumbersome and introduce issues.

    • @peanut_games
      @peanut_games  7 หลายเดือนก่อน +1

      Should be fine as is, make the construction script set the mesh to a variable and right click on the blueprint to make children of the class. Expose all the variables like speed, turn rate, etc.

    • @sensi2fr
      @sensi2fr 7 หลายเดือนก่อน

      @@peanut_games Thank you for the quick reply, i will give it a try. :)

  • @QuinnRueggeberg
    @QuinnRueggeberg 9 หลายเดือนก่อน

    Hey! Gotta say, this video dropped at the right time. Taking part in a game jam rn where I really needed this. It works well, only problem is that the longer I'm on the boat, the more the view of the character shifts to one side until it looks like the character is floating next to the boat. The boat also often turns over. Is there a way to keep the camera at the right location, and also to stabilize the boat so that it doesn't turn over? An answer would be so appreciated, since that would relly help with the jam project

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      Yeah play with the buoyancy component settings and pontoon locations. Angular dampening in particular will make it resist rotation. The character moving is really odd since it's attached to the boat right? Maybe using a camera and switching the players view point instead is an option. Perhaps your movement is still triggering too, make sure the boat controls cancel out walking input.

  • @MemeIsAllreadyInUse
    @MemeIsAllreadyInUse 5 หลายเดือนก่อน

    I cant steer my boat plz help i did everything right and im NOT a begginer this tut was a piece of cake but the steering logic dosent work

    • @peanut_games
      @peanut_games  5 หลายเดือนก่อน

      Someone else said this too, none of the physics torque functions worked.. maybe a 5.4 issue? They ended up just going with Set World Rotation although not ideal.

    • @MemeIsAllreadyInUse
      @MemeIsAllreadyInUse 5 หลายเดือนก่อน

      @@peanut_games Thanks for the quick respond

    • @MemeIsAllreadyInUse
      @MemeIsAllreadyInUse 5 หลายเดือนก่อน

      @@peanut_games But Its add world rotation to the boat static mesh not set

  • @LAYATORS
    @LAYATORS 9 หลายเดือนก่อน

    Hi, thank you for the water plugin vidos! May you make a tutorial on how to make the wave effect of a body in water?

    • @LAYATORS
      @LAYATORS 2 หลายเดือนก่อน

      Dynamic forrce component and dynamic fluid sim components in water plugin

  • @endtasid
    @endtasid 9 หลายเดือนก่อน

    As my boat is a bit large(a 40meter torpedoboat from the WW1), I didn't use the buoyancy component as it always gave strange results on my boats, making them jump around, do somersaults or simply rocket into stratosphere. Instead I modified the pitch and roll of the boat by using location and rotation changes connected to a sin function, which processes time. As my player character also needs to walk in and around the boat, I used complex collisions as simple on the boat static mesh. And that disables the use of physics sadly. So your method of applying force and torque to move the boat is not usable for me. Maybe I need to manually change the location and rotation again, like I did for the rolling of the boat. Do you have a suggestion? Thank you very much.

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      Personally my highest interest would be restoring physics. So I'd suggest either manually creating a simple collision that works or simply disable collision with the player on the simulating mesh and parent another invisible mesh with complex collision to the simulating mesh. I just tested it and it works. This method of course removes interaction between the simulating simple mesh and the player which means jumping and moving will not tip the boat at all, but this is probably desirable for a large boat as no inconsequential calculations are happening. Hacky but good results.

    • @endtasid
      @endtasid 9 หลายเดือนก่อน

      Yes leaving many movements to physics is a great opportunity instead of making them in code. I've tried manually creating simple collisions but they are very rough and the torpedoboat has masts etc, making the player walk 10 meters in the air. My buoyancy is all over the place with the torpedoboat mesh I don't know why. With the box mesh it works well. I was thinking of something like making the simulated box mesh invisible, then add my torpedoboat as a visible but not simulated mesh with complex collisions as simple for the player to walk on. As the box will be comparatively small inside the boat, the player collisons with it would not matter, even they do i guess i can simply disable them. You wrote "parent another invisible mesh with complex collision to the simulating mesh" which I didnt be able to understand exactly what you mean.@@peanut_games

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      @@endtasid I basically said what you said there, attach the complex collision to another mesh with buoyancy. Yeah you could just use a big invisible cube/cylinder for floating and stick the actual boat to that.

    • @endtasid
      @endtasid 9 หลายเดือนก่อน

      @@peanut_games thank you very much.

    • @endtasid
      @endtasid 9 หลายเดือนก่อน

      I made it, the big unsimulated boat now floats on the water thanks to the buoyancy of the little cube inside. I've changed its collisons to block all and use complex collisions as simple but still the first person just walls down thru the mesh. Still trying to figure out why.@@peanut_games

  • @ritecist596
    @ritecist596 8 หลายเดือนก่อน +2

    the tuitorial is good but if you can explain why you do what you do. I think that will be good for beginners

  • @accountassignment9377
    @accountassignment9377 7 หลายเดือนก่อน

    I had a question. When I pressed W, the boat moved forward well, but my first person character stayed at the original position. Why?

    • @peanut_games
      @peanut_games  7 หลายเดือนก่อน

      gotta attach character to the boat mesh, maybe something on the side is unattaching it if you did that

    • @accountassignment9377
      @accountassignment9377 7 หลายเดือนก่อน

      @@peanut_games Thanks for replying. I've attached the character to the boat. I think it's the problem of the socket manager. It seems that it does not recognize the socket. I've followed all your steps, so is there anything wrong with my socket?

    • @peanut_games
      @peanut_games  7 หลายเดือนก่อน

      @@accountassignment9377 you can clear the socket name from the attach to node and it'll just snap to 0 0 0 on the boat, if that still doesn't work then something else is not allowing the player to attach. Just an example but if you set enable physics simulation it'll detach actors.

    • @accountassignment9377
      @accountassignment9377 7 หลายเดือนก่อน

      @@peanut_games Thanks! Will try that.

  • @nobrainerrgames
    @nobrainerrgames 6 หลายเดือนก่อน

    hi, great tutorial! im gonna implement it to motorboat in game im developing, been looking for something as clean and neat as this one for a while mate🫶🏻 thanks for your work!
    ps. i'm actually starting with gamedev and watching this vid and trying to use 'pressed [the same] key' event came to conclusion/question- is it better practice to map i.e. E key as 'input action' and use general event 'input action' on overlap different actors to mount/dismount various vehicles? i got motorbike for now but want to add moving with my motorboat as well, hence why asking😅 hope above makes sense

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน +1

      Yes create an input action and an interface for 'interact' - Implement IA_Interact in the player character to check for overlap in either a sphere or use a line trace to detect actors with the interface ( Does Implement Interface ). An interface is basically a shell of a function that can be called from and implemented anywhere without having to share parent classes. Make the vehicles share a parent class like BP_Vehicle_Base, housing all the shared functions related to mounting/dismounting. Right click -> Create Child Blueprint Class. Thanks for watching!

    • @nobrainerrgames
      @nobrainerrgames 6 หลายเดือนก่อน

      @@peanut_games that's what i did right after commenting and it worked perfectly on both- boat and motorbike! :)
      btw. boat moving works perfectly, but steering doesn't- any clue what can be the reason? i followed tutorial step by step, my boat mesh is also rotated 90degrees so i've done 'combine rotators' just like you. tried to put some stupid amount of 5000 on X-axis in steering- won't turn at all.
      EDIT: tl;dr below and it's not relevant anymore, it's fixed- although i'm gonna leave it if anyone else will face similar problem!
      i don't want to test your patience and try my luck to hard but my character seems to still walk while mounted in the boat lol (i know cause i got steps sound attached to animation). if you'd be kind enough to help it'd be amazing, thank you in advance!
      edit: i've put "animation override" after "disable movement" and before "add mapping context" on mounting to boat, and it works but when im dismounting from the boat character is not animating again lol.
      edit2: i've fixed it with "set animation mode" - "use animation blueprint" with mesh as a target and it worked just fine! :)

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      @@nobrainerrgames Yep I was gonna say set animation mode to a single animation, then set it back to your animBP, glad you got it working

    • @nobrainerrgames
      @nobrainerrgames 6 หลายเดือนก่อน

      @@peanut_games great to know i've handled this in correct way🎉 although my steering doesn't work- any idea why is that? what should i check? any hint?🫶🏻
      edit: forgot to say- anyway i appreciate you spending free time on answering all my/our questions to help us all progress, honestly

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      @@nobrainerrgames I'd start by checking the mappings, put a print string on the triggered output to make sure it's executing in the first place. Then try toggling Accel Change.

  • @JDAeroVR
    @JDAeroVR 3 หลายเดือนก่อน

    well done!

  • @polzasquiu
    @polzasquiu 9 หลายเดือนก่อน

    hi i am having some problems and i dont really know why, I did what u do in the video but the boat just doesnt wanna move, neither does detect any input for moving, only the possesion works

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      make sure you're adding the input mapping context and that its priority is higher than your main

    • @polzasquiu
      @polzasquiu 9 หลายเดือนก่อน +1

      ​@@peanut_games now it only works the steer (a+d) not the force (w+s) + the camera makes a zoom

    • @HotSadist
      @HotSadist 3 หลายเดือนก่อน

      ​@@polzasquiu I have exactly this same problem

  • @-JimRice-
    @-JimRice- 9 หลายเดือนก่อน

    This works well, But i'm implementing co-op. In the editor all works will with multiple players, but when I package the project to playtest with some friends, the boat just falls through the water. Any Idea how I can fix this?

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน +1

      First just make sure the root component absolutely is the static mesh and that "Replicates" and "Replicate Movement" are ticked. Does it float normally for the host?

    • @-JimRice-
      @-JimRice- 9 หลายเดือนก่อน

      @peanut_games everything works like planned in the editor, host and client side. Just when I package it things are different. If I delete the box collision used to control the ship, then the boat floats in the packaged game, but of course isn't driveable

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      @@-JimRice- yeah box collision has to be parent of staticmesh -- staticmesh has to be root. You can drag them around

    • @-JimRice-
      @-JimRice- 9 หลายเดือนก่อน

      ​@@peanut_gamesgotcha, I believe all my parents are correct. Could it be a 5.3 bug?

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      @@-JimRice- I already have the project so I'll build and see if it works. Are you building in shipping or development?

  • @FieldofBattle1943
    @FieldofBattle1943 9 หลายเดือนก่อน

    My boat continues to go when I hit the landscape, in fact it takes off like a rocket. Any thoughts?

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      Probably just due to physics settings. In my case the force applied was almost entirely zeroed on land due to friction. Play with the mass of the mesh and force values.

  • @astralstormgamestudios1259
    @astralstormgamestudios1259 9 หลายเดือนก่อน

    I'm really stuck with a weird issue that no one seems to encounter. I have true fps setup from the third person template when I deleted the spring arm (boom) and parented my camera to the character mesh and socket is head bone. The problem; My camera gets wrong location/rotation if I fuck around with the mouse, so when I exit the boat it's all wrong.. also if the boat tips upsidedown and I exit my character is lying on the side and camera all effed up 🤷🏼‍♂️ I don't get it...please mr peanut 🥜 do You have a solution?

    • @peanut_games
      @peanut_games  9 หลายเดือนก่อน

      that sounds really bizarre lol, are you perhaps attaching the character mesh instead of the capsule?

    • @astralstormgamestudios1259
      @astralstormgamestudios1259 9 หลายเดือนก่อน

      @@peanut_games I dont know, maybe 🤔 was so tired when I made it, but seems like it since it's not the camera, I pressed F8 to eject and I saw my dude was all leaning to the left 🤷🏼‍♂️

    • @astralstormgamestudios1259
      @astralstormgamestudios1259 9 หลายเดือนก่อน

      @@peanut_games I just did follow your setup, using the third person template.. I have it exactly Like you.. I have no idea why this is like this

    • @astralstormgamestudios1259
      @astralstormgamestudios1259 9 หลายเดือนก่อน

      @@peanut_games When I start my game rotation x y is 0,0,0.. When I enter boat it changes

    • @astralstormgamestudios1259
      @astralstormgamestudios1259 9 หลายเดือนก่อน

      @@peanut_games I managed to fix it by set Actor transform at the end of remove mapping context (when detatch)... The issue wich remains is that my player as taking rotation from the boat , so when I drive forward he starts to lean more forward overtime ? .. Ideas?

  • @jokypaerng988
    @jokypaerng988 7 หลายเดือนก่อน

    please make a video of the character getting into the boat with animation

  • @BryLegend
    @BryLegend 6 หลายเดือนก่อน

    Does it work for vr?

    • @peanut_games
      @peanut_games  6 หลายเดือนก่อน

      Don't see why not if you configure the input mappings for VR

  • @Evangelos_Bl
    @Evangelos_Bl 5 หลายเดือนก่อน

    Thank you very much

  • @ethanwasme4307
    @ethanwasme4307 8 หลายเดือนก่อน

    i need a way to do a submarine, will look through this series to see if it can be done :D

    • @peanut_games
      @peanut_games  8 หลายเดือนก่อน +1

      Should be possible to dynamically set buoyancy force so it floats in place/sinks based on inputs.

    • @ethanwasme4307
      @ethanwasme4307 8 หลายเดือนก่อน

      @@peanut_games I can't seem to find any functions available to change these settings at runtime unfortunately :/
      i.gyazo.com/558b9b31a6f6419a088969db232adcfd.png

    • @peanut_games
      @peanut_games  8 หลายเดือนก่อน +1

      I see another comment in youtube studio that isn't showing up here and never notified me... looks like you'll have to use set mass scale on the mesh

    • @ethanwasme4307
      @ethanwasme4307 8 หลายเดือนก่อน

      @@peanut_games youtube wont even show my own comments being replied to xD
      thanks for getting back to me

  • @hariom404-u6c
    @hariom404-u6c 10 หลายเดือนก่อน

    Nice ❤