Jump to content

Falling through Terrain


Go to solution Solved by Josh,

Recommended Posts

Posted

Even unscaled terrain seems to not work too well against the player. I suspect this has to do with me adding half-floats into the terrain collider....

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Maybe not. I switched to 32-bit floats and I still get the same strange behavior.  Standby...

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

There's also a slight mismatch between the terrain collider and the visible geometry, maybe a one-meter horizontal offset...

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Okay, I found there was a small error in the terrain texcoord calculation, which caused heightmap lookups to be half a pixel off. This caused a mismatch between the visual and physics geometry. I will continue working on this tomorrow, but I suspect everything will work out correctly now.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

I have fixed the horizontal scaling. However, it looks like vertical scaling of terrain is not supported. Something should be done to resolve this or prevent the user from creating the situation, but I am not sure what yet...

My job is to make tools you love, with the features you want, and performance you can't live without.

  • Solution
Posted

I think I have a solution.

In the terrain loading code, if the y component of the terrain scale is not one, then it gets set to one and every terrain point's height gets multiplied by that scale value.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...