Search Issue Tracker

Fixed

Votes

0

Found in

5.3.4f1

Issue ID

788881

Regression

No

[Physics2D][ContactPoint2D] collider and otherCollider return values are swapped

Physics2D

-

Repro steps:
1) Open the project I attached and test.scene in it
2) Notice 2 circles and 2 spheres
3) Play the scene and move the left circle to collide with the right one
4) Open up the console
5) Notice that the 3rd and 4th Log message in the console is mixed up (game object ThisOne has the script attached)
6) Open CollisionManager.cs and look at 3rd and 4th Debug.Log messages
7) Notice ContactPoint2D.collider returns otherCollider gameobject and ContactPoint2D.otherCollider returns collider gameobject
8) Doesn't happen with 3D spheres as it has thisCollider instead (analogical script attached to the left sphere)

Expected behaviour: ContactPoint2D.collider returns gameObject with the attached collider
Actual: collider and otherCollider of ContactPoint2D is mixed up

Reproduced in: 5.4.0b15; 5.3.4p4; 5.2.4f1

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.