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.
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
Tagalong menu position
I've attached Tagalong script to a canvas with several buttons. advice needed for these 2 issues:
canvas sometimes still sinks into other holograms instead of moving in front of hologram. most of the time canvas will slowly emerge to front of hologram when collision is detected. any way to prevent it from sinking or make it hover over other holograms faster?
how do I keep the canvas to always stay at the bottom of FOV?
thx
Tagged:
0
Answers
@felsiska,
1. Ensure that all of your holograms have colliders. TagAlong's raycast won't detect these objects if they do not have colliders.
2. In 'SimpleTagAlong.cs' you should be able to modify the resulting frustumPlanes object to only cover the lower part of the camera frustum:
frustumPlanes = GeometryUtility.CalculateFrustumPlanes(Camera.main);
Additionally, if you aren't using SimpleTagalong, you can increase HorizontalRayCount and/or VerticalRayCount to increase the likelihood that one of the TagAlong's Raycasts will hit your other hologram(s).
@ahillier @timg
i am only using Tagalong as i want it to be in front of all objects. how can i implement the locking of position to bottom of frustum in Tagalong.cs? i'm also not sure how to edit
frustumPlanes = GeometryUtility.CalculateFrustumPlanes(Camera.main);
to lock it only to bottom.thx for previous advices
You'll probably want to implement your own class that derives from Tagalong or SimpleTagalong and in that class, override
CalculateTargetPosition
. In that method, you should adjustfrustumPlanes[frustumTop]
by moving it down, thus forcing your tagalong to resolve its targeted position in the lower portion of the frustum. then, callbase.CalculateTargetPosition
.I've not tried this myself, but the approach seems sound.
@timg What you mean by moving it down?. Why do all you guys leave everything to suspense .
@timg > @timg said:
>
frustumPlanes is filled in by
GraphicsUtility.CalculateFrustumPlanes()
. By moving it down, I mean to shrink the area Tagalong has to play with by taking the frustomTop plane and moving it down. See the pictures here to help visualize what you are trying to do.Like I said above, I've note tried this myself, but the approach seems sound. You'll probably need to implement these steps:
1. Find a point on the plane.
2. Calculate a new point along the plane's normal.
3. Use
SetNormalAndPosition()
to updatefrustumPlanes[frustumTop]
.edit - updated steps that match the code below
1. Find a point in front of the camera
2. Redefine
frustumPlanes[frustumTop]
with that point and the original normal for the planeHere's some actual code to get you started...