Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Assert error every frame demanding "Near plane must be zero for raycast distances to be correct" #158

Closed
provencher opened this issue May 6, 2019 · 10 comments
Labels
Bug Something isn't working

Comments

@provencher
Copy link

provencher commented May 6, 2019

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

Focus provider expects near plane to be zero on UIRaycastCamera, when that makes no sense.
It pops an assert every frame because of this.

To Reproduce

Open up and configure a blank scene with Lumin setup. Hit play

Debug.Assert(UIRaycastCamera.nearClipPlane.Equals(0f), "Near plane must be zero for raycast distances to be correct"); will pop from method private void RaycastGraphics(IMixedRealityPointer pointer, PointerEventData graphicEventData, LayerMask[] prioritizedLayerMasks, PointerHitResult hitResult) in the FocusProvider.

Expected behavior

No assert error every frame.

Actual behavior

Assert error every frame

Your Setup (please complete the following information)

  • Unity Version 2019.1.0f2
  • XRTK Version 0.1.8
  • XRTK Lumin configured

Target Platform (please complete the following information)

  • WMR immersive
  • OpenVR
  • HoloLens
  • Lumin
@provencher provencher added the Bug Something isn't working label May 6, 2019
@StephenHodgson
Copy link
Contributor

Should be fixed in 0.1.9

@provencher
Copy link
Author

When's that coming?

@StephenHodgson
Copy link
Contributor

Pretty sure that's the latest release, let me double check.

@StephenHodgson
Copy link
Contributor

Yup, it's already out, please update and let me know if it still persists.

Fixed in #153

@provencher
Copy link
Author

I just pulled this evening lol! I'll update and give it a try this week sometime.

Thanks!

@wassx
Copy link
Contributor

wassx commented May 7, 2019

I tried 0.1.9 on an existing project where same issue ocurrs. When I try to set the near clipping plane of the uiRaycastCamera to 0 it jumps back to 0.01 in the editor.

Comparing upm branch to development the RaycastGraphics in FocusProvider.cs is different

@wassx
Copy link
Contributor

wassx commented May 7, 2019

it seems this commit hasn't made it into 0.1.9 3985a85

https://github.com/XRTK/XRTK-Core/commits/development

@dumitrusisianu
Copy link

Near clip plane can be set to zero only if UIRaycastCamera is ortographic (instead of perspective). With ortographic camera, the input seems to be working fine on the Leap, but is not working correctly in the Editor.

@StephenHodgson StephenHodgson reopened this May 7, 2019
@StephenHodgson
Copy link
Contributor

StephenHodgson commented May 7, 2019

My apologies guys. I'll reopen this until it hits release 0.1.10

@StephenHodgson
Copy link
Contributor

Closing now that 0.1.10 is released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants