# Need boat on the waves

Here’s my task. A I’m extremely new to Unity 3D and not a programmer so please spell out acronyms an such as I probably will ask. B. I need to show boat on the ocean rocking w/ the waves and don’t have a clue where to start or if there’s existing things I could use.

Moving the boat is best done with the physics engine or animations.

I posted a video a long while back where I created a mesh ocean with waves, then used an invisible box collider to “float” on the surface and then used spring joints to connect that to my boat. The result was fairly good. @Daniel - is that what you meant?

Or, if you have pro, you could render the surface from above into a render texture with a shader outputting normals as colors. Then you could just do a check of those colors (or maybe check a few, and avarage their direction), and make your boat point the same ways as the result.

To give a little more detail on what I’m actually trying to do. We’ve done extensive analysis using CFD to determine the list, roll, pitch etc. at different headings and wave scenarios. I can’t use the physics engine. We were hoping to take this data and develop either a video or “game” where we can show all of this.

We don’t have pro just yet as we’re still experimenting w/ Unity to determine if we want to buy it. We were using Eye-Sys to do this kind of stuff but licensing and costs are making us look into game engines.

Bigkahuna-It sounds like what you did is similar to what I need but I’ll have to check out your video at home.

Kragh-sounds cool but WWWAAAYYY over my head right now. Could you flesh that out a bit or link me to some tuts.

Kragh

It really isn’t astro physics Normally, when you render an object, the shader is made so it calculates the color of the surface, by doing some vector math on the light direction, the view direction and the surface normal.
But you can just color the surface with the normal vector instead.
A vector is composed of 3 values, one per dimension in 3D. And a color is composed of three colors, RGB. So, when you have colored the surface with the normals, a simple pixel check will reveal the direction of the surface at that specific point.
And when you know the surface directions in an area, you will be able to calculate how your boat would align on top of that…

But it really is a problem with many solutions. I hope you find the right one…