How to read google tango translation (delta) on unity? - google-project-tango

I am trying to add a pause button for a google tango game on unity, but unsure how to pause google tango without resseting it...
Tried to look the web for a tutorial on how to read google tango xyz translation and quatreunion rotationto the translation manually but could not find a usefull tutorial.

I think there are two kinds of pause you can implement.
Pause at the current location, and resume moving from the same location.
For this one, you will need to manually save a transformation offset, and apply it after resume the application.
Pause at the current location, and resume moving form the latest tracked location.
For this one, you could just keep use the motion tracking pose in the background, but don't update the UI or 3D object when the app is paused.

Related

AudioAnalyser with three.js

https://glitch.com/edit/#!/pulseball?path=cube_audio_analyser2.0.html%3A1%3A0
I am trying to create an audio analyser in Three.js (see link above) also the sound file is in the assets. I am getting an error three.js:41273 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
So i have put in sound.resume() in the play function (see code) but i the error is still there i can click on the play and pause buttons and the track is played but i don't think the audio analyser is working. I have looked at the docs and some examples from Three.js and the web audio api copied the code from these sources but there is no reaction from the musical data to animate the cube. Could someone please help as I am sure what to do next.
thanks
Because of CORS restriction, it's not possible to load the audio file from glitch. I've slightly updated your code and use now an audio file from the official three.js repository. Check out how the frequency data are logged in the browser console.
https://orchid-iodized-action.glitch.me

Creating An Interactive Timeline

I want to build a 3D design program, just like tinkercad. However in this program user can create keyframes and play animation through a timeline in UI.
This is nothing new, many desktop applications can do this (e.g Blender, 3DSMax, AfterFX...). However, I couldn't find an example project or anything that comes handy in documentations. Is it possible to make it happen in three.js?
Have a look at GreenSock's GSAP, it is a general purpose HTML5 animation library, which can easily be applied to a three.js project. This is a tutorial about creating Timelines using GSAP
You might also want to check out the Under Neon Lights editor which uses Frame.js

Override image feed into Vuforia in Unity

I want to record the video feed captured from Vuforia then play the scene back, allowing for the tracked image marker to be enabled or disabled upon playback. I know Vuforia allows me to access camera properties with Vuforia.CameraDevice.Instance but there doesn't seem to be a way to override the incoming image with a prerecorded one.
I know I could record the state (position and rotation) of the objects during the recording but it seems more elegant for them to be tracking in realtime based off a prerecorded video feed. Thanks.
I attempted this as well, to no avail.
From: Is is possible to use Vuforia without a camera?
...but the Vuforia SDK prevents the use of any other source than the camera.
I guess the main reason for this is that the camera management is fully handled internally by the Vuforia SDK, probably in order to make it easier to use as managing the camera by ourselves is at best a boring task (lines and lines of code to repeat in each project...), at worst a huge pain in the ass (especially on Android where there are sometimes devices than don't behave as expected).

Object floating and moving with user movement

i'm trying to create a simple Tango application to visualize my 3D models. The problem is that, when I hold my Tango device and move around, I can see my model is also moving with me.
Looks like my physical movement is not reflected in my Tango app in correct scale - like when I stepped for 3 feets, I only moved 2.5 feets or so in the app. However I found other Tango applications on the same device works perfectly - their 3D objects are stable and stays on the same spot without moving.
Please advice. Thank you.

Any possibility to get a notification if another application receives a scroll event?

I'm developing an application in Cocoa which allows users to draw on any given window in OS X. The drawings move along with the corresponding window when dragged on screen. To complete this tie between drawings and the windows (and their contents) beneath, I'd like to catch scrolling events from the window in order to react on the positioning/visibility of the drawings.
An example:
The user opens Safari and browses the web. On a specific website s/he draws a circle around a link and takes hand written notes (this is all considered a drawing, input by a pen tablet). Afterwards s/he moves the window, the drawings are also being moved so that they remain on top of the link on the website. Then s/he begins to scroll the website and the location of the link changes (moves up until it's outside of the viewport).
Now I'd like to catch that event and also move the layer with the drawings to keep them on top of the link. When the link is no longer visible, I'd turn off the visibility of the drawing and turn it back on when scrolling brings the link back on to the viewport.
I know this is a quite tricky assignment and being able to intercept such events from another application might as well be considered an OS security flaw but maybe someone out there is good enough a coder to give me a hint... :)
The Cocoa Accessibility classes may be helpful but until now I haven't found the solution.
Thanks for your help.
Oh, and if that's not tricky to you, maybe you can tell me how to get notified when Safari switches Tabs ;)
kkthxbai
I'm not sure if you can monitor scroll events. However, it's a lot easier if you just monitor the position of the link with the Accessibility API.
Just hold a reference to that link and constantly poll it for its position, if the position changes, you know what to do.
You could also try using AXObserverAddNotification, but as far as I am aware, there is no notification you can monitor for position changes.
If you haven't discovered it already, the Accessibility Inspector can help you a lot with identifying things that you can get using the Accessibility API and pfiddlesoft's UI Browser lets you register for notifications.

Resources