|
-
Jan 29th, 2019, 09:41 AM
#14
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:
Last edited by The trick; Jan 29th, 2019 at 09:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|