Boat physics

Hey

I would like to write a boat physics.
I have a Unity Essentials book :slight_smile:
I read it.

I am a beginner in Unity3D :frowning:
but i a java and c++ programmer.

PS.please, give some example

Help,
Leszek

This is just off the top of my head…

but my first thought about making a floating boat is

Make a boat mesh a rigidbody

Write some function so this rigidbody is self uprighting at a certain rate

Make a cube with a water texture on it

Make it so that when the boat rigidbody interects this cube, it uses addforce to push the boat to the surface of the cube

Perhaps implement some kind of random number, or perlin noise generator and feed the addforce with it’s values, so then the boat will wobble around

How to do all that, I don’t know. But the 2D gameplay tutorial has a spaceship in it that is driven purely by addForces. That might be a place to start

Very interesting topic…

I’m on the answer.

Have you tried to make a little sphere with rigidbody but without mesh renderer under the boat? with the movement script of the ball you can simule the waves…

Hi

I found this - http://forum.unity3d.com/viewtopic.php?t=2356&highlight=sailing+ship

It’s a nice boat physic script.