Page 1 of 1

Water Dynamics

Posted: Tue Apr 26, 2016 7:35 pm
by Duck
I've seen maps where things float in the water but most of the time this is done using distance and target object joints to suspend each object in the water. In the map I'm working on I want to be able to break of parts of the map and have them fall into the water and float (but still gib players).

Is there a way to make like a.. trampoline of sorts under the water?

Re: Water Dynamics

Posted: Wed Apr 27, 2016 9:01 pm
by Kawabanga
Check map "Monster Gut". If my memory doesn't fail me, it should have different floating mechanic.

Re: Water Dynamics

Posted: Thu Apr 28, 2016 12:12 am
by Duck
That's the map I looked at, it uses the method I described; pinning objects together using distance joints.

Re: Water Dynamics

Posted: Thu Apr 28, 2016 1:09 am
by chelog
It's possible to do it with help of script adding some vertical force upwards while objects are in water zone. But that may be a little bit laggy in multiplayer.

Re: Water Dynamics

Posted: Thu Apr 28, 2016 2:44 am
by ShutDownMan
Yeah, as chelog said, it can get a bit laggy...

I made the script, it works as expected for objects like crates and boxes, I think it will get really buggy for tiny objects.

Here's the map.
it's important to note that it's not flawless, but it can get a little less worse.

Also, this method was created by (R.I.P.) Gerald, on his map (never released) Citizens Versus.

Edit:
If you still wants it, here's a improved version (still not flawless), on this one it behaves better with the dynamic objects at the cost of a bit of more processing.
If you want, mess around with the variables (timer delay, joints force, rail's position, etc), maybe you get better results than me...