Original Post
I'm wondering whether people can give ideas for implementing the following algorithm: I wish to travel an object across the surface of a mesh/terrain. the distance travelled is variable, say X world units. NB: The traversal must follow the gradient of the land. I must therefore need to know when the object passes from one polygon to another so that the direction vector can be projected onto the new polygon. Now this would seem to be a common request, however I have found otherwise. The following is my high level algorithm: NB: the object has already been intersected with the terrain and the intersection polygon is known. 1. project the direction vector onto the current polygon 2. travel the object along the direction vector until the object intersects an edge of the polygon 3. find the neighbouring polygon with the edge intersection 4. project the direction vector onto the new polygon 5. travel until the next intersection 6. do this until the object has travelled X units. Now implementing the above is quite complex. Does anyone have any better ideas? Has this been done before?