Drive Your Boat - Boat Vehicle Tutorial for Unreal Engine 5.3

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มี.ค. 2024
  • We made the boat float, we masked out the water, now we're making it drivable.
    Check out my Unreal Engine marketplace assets:
    Physical Material Profiles - Footsteps and Impacts
    www.unrealengine.com/marketpl...
    AI Jump Navigation Links
    www.unrealengine.com/marketpl...
    Advanced Mobile Camera - Enhanced Input
    www.unrealengine.com/marketpl...
  • เกม

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

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

    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!

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

    Looking forward to trying this.

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

    Thank You! Amazing tutorial!

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

    Keep up with the good work.

  • @arezgod14
    @arezgod14 3 หลายเดือนก่อน +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  3 หลายเดือนก่อน +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!

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

    Nice ❤

  • @ItayHa-zx9dw
    @ItayHa-zx9dw 2 หลายเดือนก่อน +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?

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

    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?

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

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

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

    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  หลายเดือนก่อน +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.

  • @sensi2fr
    @sensi2fr 22 วันที่ผ่านมา

    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  22 วันที่ผ่านมา +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 22 วันที่ผ่านมา

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

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

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

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

    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  2 หลายเดือนก่อน

      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.

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

    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  2 หลายเดือนก่อน

      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 2 หลายเดือนก่อน

      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  2 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน

      @@peanut_games thank you very much.

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

      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

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

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

    • @peanut_games
      @peanut_games  หลายเดือนก่อน +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

  • @Parsifal308
    @Parsifal308 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +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 2 หลายเดือนก่อน

      @@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  2 หลายเดือนก่อน +1

      ​@@Parsifal308 I would expect nothing less

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

    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  2 หลายเดือนก่อน +1

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

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

      @@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  หลายเดือนก่อน +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 หลายเดือนก่อน

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

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

    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  2 หลายเดือนก่อน

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

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

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

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

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

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

      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.

  • @accountassignment9377
    @accountassignment9377 15 วันที่ผ่านมา

    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  15 วันที่ผ่านมา

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

    • @accountassignment9377
      @accountassignment9377 14 วันที่ผ่านมา

      @@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  14 วันที่ผ่านมา

      @@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 14 วันที่ผ่านมา

      @@peanut_games Thanks! Will try that.

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

    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  2 หลายเดือนก่อน +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- 2 หลายเดือนก่อน

      @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  2 หลายเดือนก่อน

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

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

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

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

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

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

    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  2 หลายเดือนก่อน

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

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

      @@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 2 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน

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

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

      @@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?