Cesium World Terrain Collision

Hello,

I’m working on a car drive simulation using splinetrack (just like in the flight track tutorial), but my imprecise altitude coordinates cause the car to appear underground sometimes. Is there a way to handle collisions between the car and the Cesium World Terrain to prevent this issue?

Thanks in advance!

Hi @Leedia,

You should be able to handle collisions on tilesets, including Cesium World Terrain, if the “Create Physics Meshes” option is enabled under the Cesium3DTileset component. If you are enabling that option and the collisions / physics aren’t working, let us know.

hi @janine ,
Thank you for the quick reply! And yes the option is already enabled.

image
image

Hi @Leedia,

I read and answered your question too quickly :sweat_smile: I don’t think the script in the flight tracker tutorial was not made to handle physics or collisions, but maybe these suggestions can help.

In the Set Actor Transform blueprint node, there is a “Sweep” option which basically moves the actor until there is a collision, and stops if there is one. I don’t know how well this will look if rotational physics isn’t enabled on your car, since this might lead to your car floating when a corner of it collides with a hill. But it is probably a start.

Alternatively, you can line trace between two points in the spline and detect if there is something in the way (e.g. Cesium World Terrain). Maybe you can use that to alter the behavior after the car reaches that collision point in the spline – for example, once you run into a collision point, try enabling physics on the car and moving it towards the next spline point with physics. The actual implementation might require more programming and fine tuning of the behaviour, but it’s an idea :')

Hi @janine ,

I recently came across a similar issue with my 3rd person character. I noticed that the collision detection is not working properly as part of the player’s feet always dip into the mesh.

Additionally, whenever I look below my character, I go right through the ground, just like in the gif.
ezgif.com-video-to-gif

I have already tried switching on the “Create Physics Meshes” option for both the Cesium3DTileset and the terrain components. However, the issue still persists.

I am hoping that someone in this community can provide some advice or guidance on how to resolve this issue. Any suggestions or insights would be greatly appreciated. Thank you! :face_holding_back_tears:

Hi, maybe it is the setting of collision part of the Cesium3DTileset, you can choose BlockAll of the Collision Presets Part.