-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolation of height calculation isn't 100% precise #56
Comments
Did you collide at that point, or could you go down even further? If you did collide at some point, this may just be due to the collision mesh being pretty imprecise (noticeable at relatively low LODs) - we could expand that code to make it more exact, or to be able to specify that in the settings. |
its colliding at some point .. so it's the mentioned inprecision |
The precision of the collision mesh can now be specified in the settings with 6232127. This fixes some problems, however, this particular issue remains, since the player doesn't use the collision mesh, but the actual pixel value. I will test whether it's feasible to make the collision mesh precise enough, and only use that instead of the pixel values. Otherwise, we will have to interpolate the height values to provide smooth gradients from pixel to pixel. |
Interpolation has been added in 98b51b3. This makes movement on the ground smoother and makes this problem less frequent, but it's still there. I believe that this could be due to the mesh quads not actually being bilinear, like the interpolation, because they're laid out like this after triangulation:
Interpolating like this would be more complex, but doable. It could also be something related to an offset or scaling - I have tested various changes in that direction with no good results, but the way this behaves makes it look like an offset issue sometimes. Re-implementing wireframes (#55) would probably help with debugging this. |
8d41f3a fixes the issue which I described as seeming like an offset. This further reduces the extent of this problem. After some more testing, I'm almost certain that the remaining cases are caused by the triangle problem described above. |
it's definitely better now |
The text was updated successfully, but these errors were encountered: