Search Issue Tracker
By Design
Votes
1
Found in
2021.3.32f1
2022.3.14f1
2023.2.1f1
2023.3.0a16
Issue ID
UUM-57054
Regression
No
Raycast fails to hit Mesh Collider when mesh from 3Ds Max is used in Player
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/UVCoordsTest/SampleUV.unity” Scene
4. Build and Run
5. Enter the Play Mode
6. Open the Player.log file
7. Compare the log messages present in Player.log to the messages in the Console window
Expected result: All Raycasts are hitting the Mesh Colliders
Actual result: “SampleCoord. Hit: 5”, “SampleCoord. Hit: 6”, and “SampleCoord. Hit: 7” shows 0 for all Vectors
Reproducible with: 2021.3.32f1, 2022.3.14f1, 2023.2.1f1, 2023.3.0a16
Reproducible on:
IOS devices (User reported)
VLNQA00325, Samsung Galaxy Note10 (SM-N970F), Android 12, CPU: Exynos 9 (9825), GPU: Mali-G76
VLNQA00318, Oneplus OnePlus 7 Pro (GM1913), Android 11, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76
VLNQA00231, Samsung Galaxy A5(2017) (SM-A520F), Android 8.0.0, CPU: Exynos 7 Octa 7880, GPU: Mali-T830
VLNQA00332, Samsung Galaxy XCover4 (SM-G390F), Android 9, CPU: Exynos 7 Quad 7570, GPU: Mali-T720
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Notes:
- Reproduces with Mono and IL2CPP Scripting Backends
- Reproduces with OpenGLES3 and Vulkan Graphics APIs
- Reproduces with RaycastNonAlloc and Raycast
- Also reproducible on Windows Standalone Player
- Not reproducible in Play Mode
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note:
In order to retrieve valid uv-coordinates the CPU data for a mesh needs to be preserved. This can be done by marking a mesh as read/write enabled (as can be seen on CP_Infield).
There are also other features in the engine that preserve the mesh data on the CPU (such as mesh deformations or dynamic batching).
Some of the meshes (< 300 vertices) in the project have their CPU data preserved because they can be dynamically batched. As a result of this, the ray-cast can return non-zero values for the UV coordinates.
Marking all meshes as read/write on the importer provides the expected results.