I’m trying to get a boat to float in unreal engine 5.1…used de water plugin and a water body ocean. I have created a static mesh with physics, mass and a buoyancy component with a pontoon. But when I run the game the boat just sits on the water instead of floating. Physics work, the boat drops but it all happens on top of the water instead of floating.
The waterbodycollision was missing. I added it in the .ini file and now the buoyancy works.
Can you elaborate how you solved the issue? I’m currently running into the same issue where even the example buoyancy object in All > Engine > Plugins > Water Content > Blueprints > BP_BuoyancyExample isn’t floating (all of my objects sink to the bottom of the water).
Here’s the issue in more detail including details of the missing WaterBodyCollision profile from DefaultEngine.ini: https://forums.unrealengine.com/t/5-1-water-buoyancy-not-working/720788/11
Yes, the link that switchboardai provided is indeed where the solution was for me, specifically this part helped:
Head over to your project’s folder-> config → DefaultEngine.ini
Slide down to your collision profiles and search for WaterBodyCollision. You likely won’t find it, we can add it here directly.
+Profiles=(Name="WaterBodyCollision",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="",CustomResponses=((Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="Default Water Collision Profile (Created by Water Plugin)")
Copy and paste that under the collision profile list, then launch the project and check for it in the water as well as in the project settings.
The code worked perfect for me, thanks, was glad i found this post. Buoyancy is working for me, but how do i make it work with keyframes? I am trying to record a boat going from a to b, but with buoyancy for realism. However when i play the keyframe animation it sinks and gets dragged along. Any help would be much appreciated, thank you.
i cannot collisions profile list ?
Exactly what I was looking for ty