Search Issue Tracker

Won't Fix

Votes

4

Found in [Package]

0.6.0-preview.3

Issue ID

1369770

Regression

No

ColliderCastHit.Position returns NaN when SphereCasting to Capsule Collider with Vertex1 = Vertex2

Package: Unity Physics

-

Reproduction steps:
1. Open attached project "1369770_SphereCast"
2. Open Scenes/Empty
3. Open Scripts/TestCapsuleSphereCast/CapsuleSpawnSystem and uncomment line 22 and comment-out line 23
4. Save the Script and enter Play Mode

Expected result: ColliderCastHit.Position is the position of the hit
Actual result: ColliderCastHit.Position is NaN

Reproducible with: 0.6.0-preview.3 (2020.3.20f1, 2021.1.26f1, 2021.2.0b15, 2022.1.0a13)
Could not test with: 0.4.1-preview (2019.4.32f1, Compiler error: The type or namespace name 'Entities' does not exist in the namespace 'Unity'), 0.5.1-preview.2 (2020.3.20f1, 2021.1.26f1, 2021.2.0b15, 2022.1.0a13, Compiler Error: 'CollisionWorld' does not contain a definition for 'SphereCastCustom' and no accessible extension method 'SphereCastCustom' accepting a first argument of type 'CollisionWorld' could be found)

Notes:
- ColliderCastHit Fraction and SurfaceNormal is also NaN
- Position checking is in Scripts/TestCapsuleSphereCast/SphereCastSystem in line 91
- If you are getting "An error occurred while resolving packages:" errors, remove "com.madsbangh.easybuttons" package in the Package Manager

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.