Original Post
I recently posted about finding the height at a particular point on a triangle mesh landscape. Thanks to Roos I put the plane equation to work and it does work most of the time. However, my objects will move over the landscape following the surface closly but every now and then they jump up in the y direction for no apparent reason. What's more annoying is that they only jump a small distance, so it's not a divide by zero problem which would be easier to find. I know the objects are on the correct triangle and I know that I am getting the correct surrounding vertices and am creating the vectors correctly to define the plane, so maybe somthing wrong with the plane maths? this is how i rearrainged it Ax + By + Cz - d = 0 Ax + By + Cz = d By = d - Ax - Cz y = (d - Ax - Cz) / B and here's the code I use: d = point * norm; // * is dot product, point is a corner of the tri newy = (d - (norm.x * x) - (norm.z * z)) / norm.y; // is this right? Please help! Thanks