Code Monkey home page Code Monkey logo

Comments (3)

riker96 avatar riker96 commented on July 29, 2024

UPDATE: The described behavior seems to be caused by introducing a canvas after startup. If I enable the second canvas from the outset (i.e. it is active and seen by the event system during Start()), then it can be interacted with normally. So, I've just kept it active and simply switch it's position in and out of view to mimic enable/disable.

So, the gaze pointer behavior is default for canvases added mid-game, it seems. Thoughts?

from newtonvr.

adrianrudnik avatar adrianrudnik commented on July 29, 2024

Yes, seems like the foreach GameObject.FindObjectsOfType in Start() of NVRCanvasInput does assign the world camera to each canvas once.

There are cases where the HUD is spawned from prefabs, and those get the wrong camera (hud eyes), so you end up with a misconfigured hand, which looks and acts like a gaze pointer.

Not sure how to approach it, just dug into the topic for 15 minutes and the ControllerCamera is not really accessible. Event systems and broadcasts aside, maybe create a dynamic canvas script that you could attach to your canvas. It should look up the ControllerCamera for the UI and assign it as worldCamera on the canvas.

from newtonvr.

munkeyxis avatar munkeyxis commented on July 29, 2024

I just updated to Unity 5.6.0f3 and the latest NewtonVR. It seems the coroutine that spawns the Controller UI Camera isn't running beyond the yeild return null and hence Canvases that are enabled upon scene start do not get the Controller UI Camera assigned as their Event Camera.

from newtonvr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.