crispigt.

Paddle paddle paddle

2026-05-04
physicsanimationnetworkingunity

Rewrote paddling from scratch to actually be driven by where the blade is rather than just which mouse button you clicked.

The stroke input is owner-only and has a cooldown. Before a stroke goes through, the server validates three things: the player is on the boat, the paddle is actually being held, and the blade tip is in the water. If any of those fail, nothing happens. Then the actual stroke side is determined from the blade tip's real position relative to the boat, not from which button was pressed. This also handles reverse strokes, if you intend a left stroke but the blade is on the right, it reads as a reverse, which is how actual paddling works.

For the force model I replaced the old camera-facing direction with the boat's hull axis (shipTransform.right in this project). Applied forward impulse at the center of mass to keep translation stable, then computed yaw torque separately from the blade lever arm. The blade's longitudinal position on the hull is used to compute a zone ratio that biases the stroke between more turning and more forward thrust, so paddling near the bow or stern actually behaves differently. Added some extra roll torque and a small downward impulse to give the boat a bit of physical weight when you stroke.

Also fixed the player drifting off the deck. The player now tracks the ship's frame-to-frame translation delta and inherits yaw rotation from the ship each frame. It's yaw-only so the player doesn't get tilted by roll or pitch, just carried along with the turning.

The stroke animation got a full rebuild too. There are now distinct timed phases, set, entry, drive, recovery, with configurable dip, sweep, and wrist roll. Forward and reverse strokes are mirrored rather than both starting in the same direction, so you can actually tell them apart visually.