Download

Ocean wave collision?

so i have an ocean with waves and boats that have buoyancy but now i have 2 questions

first how do i get if the buoyancy test points are underwater so for example if the boat is in the air it cant accelerate but if its on water it can move
i tried getting the test points from the buoyancy force but all i get are vectors they dont really tell me if they are underwater or not

second how do i trigger collision events with the waves for example if i fire a cannonball or the boat hits the water i want to trigger a hit event or something so i can trigger some splash effects

anyone knows?

nobody had answered yet?? i thought people would answer it easily
is it possible to do this?

Well it’s a hard question to answer as geometry driven by vertex animation can not use typical volume based collision (I assume you already know this?) What would work is a physics material that you can tack onto what ever material you are using to determine that a collision has occurred at the material level and then use that to trigger what ever state change you wish to make.

https://docs.unrealengine.com/en-us/…ysMatUserGuide

A physics material will give you a lot of different options as you can now use line trace to determine just how far up in the air the boat is relative to the water surface.

If you don’t care that a collision has occurred based on a material you could use a simple per channel trace

https://docs.unrealengine.com/en-us/…TraceByChannel

Last time I checked though TBC had issues as it did not always work with deforming mesh

Hope that at least gives you a direction. .

the buoyancy force has test points in which when they are underwater they push the boat up
so i was wondering if theres a way to get a boolean or something that will tell me if points are underwater so that if the boat is in the air or land it wont accelerate and if it goes underwater make a splash effect or something and allow it to accelerate

btw i tried line trace but it seems it doesnt detect wave height

Really hard question which everyone must ask
I`ll read all info which I find here
Thanks

ok i think i found the solution
ill leave it here if anyone else wants it

Anyone who reads this thread now or in the future, AlanisGod is using/referencing the free Community Ocean Project which generates wave height for bouncy in a CPU thread separately from the wave material.

The Community Ocean Project duplicates the ocean waves using the same math setups twice. One for blueprint collision/bouncy and one again inside the actual ocean material.

You normally can’t extract runtime heights/collision from materials, except using Render Target and then extract/read the render target output values.