Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Camera and cursor positon

eranyerany
edited October 2016 in Questions And Answers

Hi all,

I am trying to create a scene which has a plane (surface not airplane) and a ball on top of it.
After adding the plane with scale 1,1,1 i failed to see it because the camera was positioned on 0,0,0. so setting the camera to 0,80,-20 and rotation to down 45 i managed to see the plane.

The problem was that the cursor (import from HoloToolKit) doesn't hit the surface since the camera is too far from the plane (I am using emulator).

Is there a way to set cursor distance so it always hit the plane even if it is far?
By setting camera rotation to specific, will it affect how the user sees the hologram? will he always see the hologram in the rotation set by Unity?

Thanks,

Tagged:

Best Answer

Answers

  • Options

    Hello !
    I have the same issue, did you figure it out ?

    Thanks.

  • Options

    @Undred said:
    Hello !
    I have the same issue, did you figure it out ?

    Thanks.

    Not yet.

  • Options

    First of all the camera should stay at 0,0,0 as that it where your head would view from, try setting the plane transform to 0,0,5 and the rotation to -12,0,0.

    Alternatively you could also use a shader which renders on both side, you find on a plane the default render is with cull back, you could customise one of the shaders to use cull off but then the lighting will be off.

    also to easily see what your camera see in the editor windows click on your main camera and then select menu option GameObject\Align View to Selected this will make your editor window see what your camer sees.

    One other issue could be that you dont have a collider attached to the plane, which then makes the cursor not see the plane or you haare using the Cursormanager and have not set your object to the Interactible layer.

    anyway just some thoughts or your possible problem

    creative mind, free thinker, dreamer, maker, mostly working on games and doodling around with gadgets, Sphered Cazual/Elite/Master of the Universe/Dad/Husband @mariovermeulen

  • Options

    @SpheredCazual said:
    First of all the camera should stay at 0,0,0 as that it where your head would view from, try setting the plane transform to 0,0,5 and the rotation to -12,0,0.

    Alternatively you could also use a shader which renders on both side, you find on a plane the default render is with cull back, you could customise one of the shaders to use cull off but then the lighting will be off.

    also to easily see what your camera see in the editor windows click on your main camera and then select menu option GameObject\Align View to Selected this will make your editor window see what your camer sees.

    One other issue could be that you dont have a collider attached to the plane, which then makes the cursor not see the plane or you haare using the Cursormanager and have not set your object to the Interactible layer.

    anyway just some thoughts or your possible problem

    Hi SpheredCazual,

    I am trying to port Unity "roll a ball" tutorial project (https://unity3d.com/learn/tutorials/projects/roll-ball-tutorial) to HoloLens project. In this tutorial there is a ball on the plane. by rotating the plane will cause the ball to move down.
    I want to move the ball based on the cursor.

    What will user see if the camera is not set to 0,0,0?
    Should camera always be set to 0,0,0?

    Thanks,

  • Options
    eranyerany
    edited October 2016

    @SpheredCazual said:
    the Hololens is pretty much the centre of the universe so hence we place it at 0,0,0 so that everything else it based around that. It is also handy in calculating how far something is from the hololens, ie 0,1,0 would be 1 metre up from the hololens and 0,0,1 would be 1 metre away from the hololens.

    I would suggest that you modify the cursor script and if it touches the plane (with a trigger collider on it) move the plane down where the cursor touches

    Great now i got it working!!!.
    Instead of using trigger (causes ball to fall from the plane) and moving the plane, in if(GazeManager.Instance.Hit) I simply incremented the y position of the cursor by 0.1f only if collider.name == "Ground".

  • Options

    Excellent glad you got it working!

    creative mind, free thinker, dreamer, maker, mostly working on games and doodling around with gadgets, Sphered Cazual/Elite/Master of the Universe/Dad/Husband @mariovermeulen

Sign In or Register to comment.