Results 1 to 36 of 36

Thread: 3D Swimming Fish Algorithm

Threaded View

  1. #14
    PowerPoster
    Join Date
    Feb 2015
    Posts
    2,797

    Re: 3D Swimming Fish Algorithm

    From what I can tell, it's a linear interpolation for the velocity angle. For instance, prior to threshold point, we might say that we're progressing at a 45° angle (Theta1), and the reflected angle is 135° (Theta2). I will interpolate based on my Y position. We could say that threshold #1 is at Y1, and threshold #2 is at Y2.
    I think you can work without angles at all, just using the vector's algebra. Just find the normal to the collision surface and calculate the reflect vector like:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width