Skip to content

Commit

Permalink
Reduce get_height non-interpolated threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Mar 24, 2024
1 parent 622f9e7 commit c0797ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/terrain_3d_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ real_t Terrain3DStorage::get_height(Vector3 p_global_position) {
0.f,
round_multiple(pos.z, step));
// If requested position is close to a vertex, return its height
if ((pos - pos_round).length() < 0.1f) {
if ((pos - pos_round).length() < 0.01f) {
return get_pixel(TYPE_HEIGHT, pos).r;
} else {
// Otherwise, bilinearly interpolate 4 surrounding vertices
Expand Down

0 comments on commit c0797ad

Please sign in to comment.