Teleport line point does not fall on the surface

hello,

my project platform target is mobile. any solution of this issue?

Hello @terzogenito!

Can you provide a little more information?

  • Are you able to teleport? If not then the line trace is not colliding with CesiumWorldTerrain and you would have to review the collision object type that the CesiumWorldTerrain is.
  • Does this happen when you are in normal view? Or only when you are in earth view (as your picture shows)
  • Are there any custom shaders applied to the CesiumWorldTerrain? If it is translucent and has a higher sort priority than the line trace renderer’s material, the world would show up on top of the line trace.

-Ben

Yes i able to teleport, but after teleport in normal view, i’m at the right coordinate and wrong negative elevation. No any custom shader applied.

Thx.

If you are appearing below the surface it’s more than likely because the “CorrectHeight” function is not performing. Check to see if the collision channels are appropriately working for those.

When the pawn is below the surface it will trace downwards through the pawn to the center of the earth to find a point on the terrain. If it is above ground it will correct the pawn’s height.

This is needed because when Cesium World Terrain renders a low level of detail for a tile, its elevation might be dramatically different due to the active resolution when the physics trace was made. Some measures are taken to also refine the tile and gather a more accurate position, but that would also depend on the speed in which you are streaming in tiles.


For the line trace not showing up on top of the earth, this must be an effect of the mobile shaders and render sorting. Your best bet would be to experiment with different materials on the line trace renderer, such as opaque ones.

I hope this helps.