![]() ![]() ![]() All of these are available in the Mixed Reality Toolkit for Unity. You need to add in the SpeechInputSource component and register a set of phrases with it that you want your app to respond to. You can find all the voice input scripts under HoloToolkit/Input/Scripts/Voice: The phrases can trigger event listeners on SpeechInputHandler components that you attach to game objects in your scene. So here I add the InputManager prefab, and then add the SpeechInputSource to the same game object: Please note: The SpeechInputSource has a dependancy on the InputManager – which it uses to optionally route events to only the currently selected (gazed at) game object in the scene. Make sure you also enable the Microphone Capability in project settings so your app is allowed to access the microphone for voice input: You can see above I have registered two phrases “Turn Left” and “Turn Right” and set recognizer to auto start so it is constantly listening when our app starts up. Next to actually handle those keywords being spoken, you need to add in a SpeechInputHandler component. Speech can be handled either globally or locally. it is only on the Hololens that issues arise.If you checkmark “Is Global Listener” then your handler is called no matter where the user is looking, but if you don’t checkmark it, then the Speech Input Source will only route it to the game object that is currently selected by the Input Manager – which means the current game object (with collider) that the user is looking at. Maybe I am missing a setup or build configuration step or something? The MRTK camera rig works fine in the Unity player. This leads to the exact same result as the Hololens scene. I also then tried outputting a Unity scene to the Hololens that is identical to the problem one, except the MRTK is not set up on it. The anchors may be working fine, but I cannot verify this since the entire scene is moving with the user. I added a second object to the scene, and verified that moving with the Hololens on does not actually navigate around the scene at all. I don't even need persistence nor multiple users to see it nor multiple anchors. As a backup, the user placing the hologram once and then it staying there is acceptable. Ideally, this location is set once before runtime and never changes. but now without the anchors working, I see my hologram as if it is glued to the front of my face (and I also see the framerate bar even in the release version - I don't want that either).Īm I missing something? How do you actually use a world anchor? I just want my single hologram to stay put, in a physical space, and never move. (this.gameObject) Īfter following the directions here (which are out of date and DO NOT work anymore), I finally figured out how to make my project not in a window on the Hololens. Load and get a reference to the store. ![]() Start is called before the first frame update Public class HololensWorldAnchorManager : MonoBehaviour This also has had no effect: using .Utilities I finally learned that there is a WorldAnchorManager from this discussion, and attempted to use it via the code below. Then I found this demo code from this YouTube video, and started implementing that (it is way more complicated than what I need). I started by simply adding a component to the GameObject via the Unity editor, via "Add Component" > "AR" > "World Anchor". The documentation from Unity isn't much better, although it addresses WorldAnchor specifically. This is the closest documentation I can find from Microsoft, but leaves out a lot of details and doesn't have any working examples. I am having problems finding any documentation on how to use such an anchor. As noted here, the documentation on this topic seems very limited. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |