Тёмный

Drive Your Boat - Boat Vehicle Tutorial for Unreal Engine 5.3 

Peanut Games
Подписаться 906
Просмотров 3,9 тыс.
50% 1

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...

Игры

Опубликовано:

 

30 мар 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 61   
@-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 2 месяца назад
Looking forward to trying this.
@Sonofmanstudio
@Sonofmanstudio 2 месяца назад
Keep up with the good work.
@arezgod14
@arezgod14 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 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!
@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?
@technicalhariom1291
@technicalhariom1291 2 месяца назад
Nice ❤
@ritecist596
@ritecist596 Месяц назад
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 16 дней назад
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 15 дней назад
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.
@QuinnRueggeberg
@QuinnRueggeberg Месяц назад
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 Месяц назад
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.
@ItayHa-zx9dw
@ItayHa-zx9dw 2 месяца назад
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?
@sensi2fr
@sensi2fr 5 дней назад
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 5 дней назад
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 5 дней назад
@@peanut_games Thank you for the quick reply, i will give it a try. :)
@jokypaerng988
@jokypaerng988 17 дней назад
please make a video of the character getting into the boat with animation
@ethanwasme4307
@ethanwasme4307 Месяц назад
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 Месяц назад
Should be possible to dynamically set buoyancy force so it floats in place/sinks based on inputs.
@ethanwasme4307
@ethanwasme4307 Месяц назад
@@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 Месяц назад
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
@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 Месяц назад
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 Месяц назад
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 Месяц назад
@@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 Месяц назад
@@peanut_games thank you very much.
@endtasid
@endtasid Месяц назад
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
@Parsifal308
@Parsifal308 2 месяца назад
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 месяца назад
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 месяца назад
​@@Parsifal308 I would expect nothing less
@test14078
@test14078 15 дней назад
Please advise how to make the boat float only on water and stop on the shore.
@peanut_games
@peanut_games 15 дней назад
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
@FieldofBattle1943
@FieldofBattle1943 Месяц назад
My boat continues to go when I hit the landscape, in fact it takes off like a rocket. Any thoughts?
@peanut_games
@peanut_games Месяц назад
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.
@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
@-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 месяца назад
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 Месяц назад
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 Месяц назад
that sounds really bizarre lol, are you perhaps attaching the character mesh instead of the capsule?
@astralstormgamestudios1259
@astralstormgamestudios1259 Месяц назад
@@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 Месяц назад
@@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 Месяц назад
@@peanut_games When I start my game rotation x y is 0,0,0.. When I enter boat it changes
@astralstormgamestudios1259
@astralstormgamestudios1259 Месяц назад
@@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?
Далее
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 414 тыс.
Богатым буду 😂
00:26
Просмотров 949 тыс.
I Made a Game With Only FREE Assets In Unreal Engine 5
11:45
Unreal Engine Buoyancy - Making a Boat Float in UE 5.3
10:24
Unreal Engine 5 Tutorial -  Physics Movement
14:27
Просмотров 7 тыс.
Why Unreal Engine 5.4 is a Game Changer
12:46
Просмотров 1 млн
Unreal Engine Import MetaHuman Tutorial
3:22
Просмотров 15 тыс.