kids-aquarium / aquarium

Unity parts of the project
5 stars 1 forks source link

Fish should not always swim completely upright #14

Open jukkae opened 6 years ago

jukkae commented 6 years ago

Having the correction for local Y to be parallel to world Y leads to the fish preferring to swim mostly in horizontal directions. In reality, though, fish swim in all kinds of directions, it's just that they usually seem to minimize their roll.

So: Maybe something like limiting pitch to [-45, 45] degrees, and always minimizing roll.

jukkae commented 6 years ago

There's already the desiredUp parameter to turnTowardsHeading(), but that doesn't precisely correspond do pitch/yaw control.