Search Issue Tracker
Third Party Issue
Votes
0
Found in
2022.3.58f1
6000.0.38f1
6000.1.0b6
6000.2.0a3
Issue ID
UUM-98607
Regression
No
LineRenderer.BakeMesh generates a box-shaped MeshCollider when the camera's Y-axis rotation is in a specific range
How to reproduce:
1. Open the attached “IN-94755_LineRendererTest“ project
2. Open the “SampleScene“ and enter Play Mode
3. Select both the “Line” GameObject under the “Accurate Collider, Camera Y Rotation 0“ GameObject and the “Line” GameObject under the “Inaccurate Collider, Camera Y Rotation 90“
4. Observe the result
Expected result: Both “Line“ GameObjects have a MeshCollider that matches the shape of the “Line“ GameObject
Actual result: The “Line” GameObject under the “Accurate Collider, Camera Y Rotation 0“ has a MeshCollider matching its shape, while “Line” GameObject under the “Inaccurate Collider, Camera Y Rotation 90“ has a MeshCollider in the shape of a box
Reproducible with: 2022.3.58f1, 6000.0.38f1, 6000.1.0b6, 6000.2.0a3
Reproducible on: MacOS 15.3 (M4)
Not reproducible on: No other environments tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
- Group Node name text is way smaller in the renaming state than the actual display size
Resolution Note:
Heya!
What you are observing is actually physx's behavior as intended. The quick hull algorithm that is used for convex hulls needs to generate a non-zero volume. When that fails a default box volume will be used to encompass the points. (Can be observed by adding plane/quad to your scene and ticking it's MeshCollider's convex both on.
Why does it work in some rotations?
This is because there is a somewhat large floating point error coming from how the mesh is generated via the line renderer. This means that the resulting volume becomes non-zero when the vertices are passed in. Hence a convex hull does get generated.
We're tracking this limitation internally and we'll see if there's something that can be done in this case in the long run. But as it stands right now the behavior is as designed for the PhysX sdk.