Don't do depth compare on Raycasts unless they came from the same raycaster

#61 Open
Repository
playdots
Branch
multicanvasraycast
Repository
Unity-Technologies
Branch
2017.1

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 6a975b5d7ec7
hg pull -r multicanvasraycast https://bitbucket.org/playdots/ui
# Note: This will create a new head!
hg merge multicanvasraycast
hg commit -m 'Merged in playdots/ui/multicanvasraycast (pull request #61)'
Author
  1. Eddie Cameron
Reviewers
Description

Fixes Issue https://issuetracker.unity3d.com/issues/plane-distance-parameter-in-canvas-does-not-affect-raycasting-order

  • Currently, if RaycastResults from two canvases are compared, the result that had hit an object deeper in its hierarchy will count as the first hit, even if its canvas was further behind the other one.

    Depth should only be compared on results that came from the same ray caster, otherwise the other parameters will determine which is the frontmost hit.

    (Note: non-GraphicRaycaster don't set depth, so should be unaffected)

Comments (0)