Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Can someone.... (Water Buoyancy)

Author
Message
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 21st Jan 2009 04:46
Could someone please make me a small snippet demonstrating how to make a boat (box) float midway ontop of a plain? (Buoyancy)

bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 21st Jan 2009 19:16
See the Buoyancy tutorial in the demo examples in Dark Physics.

3.19GHz - 7600GT - 1GB - Windows XP
Visit my youtube profile: http://www.youtube.com/user/bergice1
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 21st Jan 2009 19:39
i did and boy was it utterly complicated.

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 22nd Jan 2009 09:15
Hmm? Anything? Could anyone simplify the demo then? make it so i can understand which objects are being assigned to what?

bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 22nd Jan 2009 15:30
Dude, its all there written down, thats all you need.

3.19GHz - 7600GT - 1GB - Windows XP
Visit my youtube profile: http://www.youtube.com/user/bergice1
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 22nd Jan 2009 15:31 Edited at: 22nd Jan 2009 15:34
Btw, the code you want is in the physics_handle sub:



So what actually makes the objects go up is this:



Simplified:

if object is below water height position
{
calculate force to forcey# variable
set body damping to simulate buoyancy
}

3.19GHz - 7600GT - 1GB - Windows XP
Visit my youtube profile: http://www.youtube.com/user/bergice1

Login to post a reply

Server time is: 2024-11-24 18:30:37
Your offset time is: 2024-11-24 18:30:37