Log in or register to post comments

Camera Movement - Script

November 21, 2013 - 5:50am #1

Hello,

I'm trying to find the script that controls the end transform/rotation of the selected AR camera. The reason for this is that I would like to add a slight Lerp to the movement so the AR content isn't as glitchy.

Or is there another way, rather than going into the core plugin scripts? I was thinking about just having another camera that copies the transform of the AR camera, and smooth it out. But then I have two cameras in the scene, and the non AR camera doesn't change the matrix accordingly to the AR camera, just causes a bunch of issues really.

Thanks, Ollie

Camera Movement - Script

November 21, 2013 - 10:20am #2

See: https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/filter-camera-position-and-rotation-avoid-jitter

That code is dated, but gives you an idea of how and where to apply filters and interpolation. Take a look at the StateManagerImpl class and specifically the UpdateCameraPose and UpdateTrackablePoses methods. You'd apply the lerp to the camera pose if the World Center Mode is set to a target, and apply it to a target if the WCM is applied to the camera.

* I've seen some good results in 3rd party apps that are using LERP on models that are significantly offset from target origin vertically, and there wasn't a conspicuous impact on pose updating. 

Log in or register to post comments