RobotecAI / o3de-rgl-gem

Robotec GPU Lidar for O3DE
Apache License 2.0
51 stars 4 forks source link

Fix terrain mesh alignment issues #39

Closed alek-kam-robotec-ai closed 3 months ago

alek-kam-robotec-ai commented 4 months ago

This pr aims to fix #35.

Before the fix (for terrain of size 5x2). First picture - Scene queries, second - RGL. SQ-before

RGL-before

The minimal point of the mesh had to be adjusted as it is in the TerrainPhysicsColliderComponent: code

After the fix (for terrain of size 5x5). First picture - Scene queries, second - RGL. SQ-after

RGL-after

Note: Upon further examination, the physics collider does not cover the same area as the rendered terrain mesh. This fix ensures only that the terrain mesh generated by the RGL gem aligns with the heightfield collider of the terrain, not the rendered geometry.