Skip to content

Commit

Permalink
Merge pull request #364 from tier4/fix/rgl-clarify-hit-triangle-facing
Browse files Browse the repository at this point in the history
Add note about Unity Raycaster and RGL comparison
  • Loading branch information
mackierx111 authored Nov 11, 2024
2 parents 7d96075 + 40c2e2b commit 11a89c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/Components/Sensors/LiDARSensor/LiDARSensor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ The ones mounted on the top of autonomous vehicles are primarily used
You can read about how to do it [here](../AddNewLiDAR/).
*MEMS-based LiDARs* due to their different design are not yet fully supported.

!!! note "Comparing with Unity Raycaster"
By default, the Unity Raycaster ([Physics.Raycast](https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Physics.Raycast.html)) does not hit in the backside of the triangles. In contrast, RGL prevents the triangles to be culled due to their orientation and rays hit them even if rays back-facing mesh triangles. Be aware of it when comparing point clouds. To achieve Unity Raycaster back-facing hits, the [Physics.queriesHitBackfaces](https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Physics-queriesHitBackfaces.html) property must be enabled. On the image below the red point is captured by Unity Raycaster (default configuration) and the blue point is captured by RGL.
<img src=rgl-unity-raycaster-comparison.png>

### Prefabs
Prefabs can be found under the following path:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 11a89c5

Please sign in to comment.