You can create an interactive motor boat simulation by combining an ocean, a motor boat, and some hotkeys to drive the boat.
- Select Fluid Effects > Ocean > Create Ocean > .
The options window appears.
- Turn on and , and then click .
- Select the boat geometry.
- Select Fluid Effects > Ocean > Make Motor Boats.
Maya attaches a locator to the boat with built-in expressions to simulate buoyancy effects.
- Select the perspective camera (persp) and select Edit > Group. This creates a group and puts the perspective camera in it.
- In the (), do the following:
- Select the boat locator and in the open the section.
- Switch to shaded mode.
- Playback the scene and adjust the throttle and rudder settings.
To speed up the simulation, you can make the zero on the ocean shader and instead increase . Increasing the also makes the simulation more dramatic.
Hotkeys
Create hotkeys for the following commands and use them to drive the boat.
Stop Boat Key
setAttr locator1.throttle 0 setAttr locator1.rudder 0
Increase Throttle
float $t = `getAttr locator1.throttle`; setAttr locator1.throttle ($t + 0.5);
Decrease Throttle
float $t = `getAttr locator1.throttle`; $t -= 0.5; if( $t < 0 ) $t = 0.0; setAttr locator1.throttle $t;
rudder Left
float $t = `getAttr locator1.rudder`; $t += 2.0; if( $t > 20 ) $t = 20; setAttr locator1.rudder $t;
rudder Right
float $t = `getAttr locator1.rudder`; $t -= 2.0; if( $t < -20 ) $t = -20; setAttr locator1.rudder $t;