Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I'm working on a project where I'm using a face tracking program. I've managed to get the live data from the tracker, and translate the rotational data of the face to rotational data of the camera, essentially rotating the camera based on the rotation of the user's face. This has worked fairly well for basically panning and tilt of a fixed camera. I am exploiting the "relativeRotationX" and "relativeRotationY" of the scene's active camera's first Animator. Strangely the camera's first Animator.Type object returns -1. What I'm after now is a way to add a AnimatorCameraModelViewer to the camera so that it only rotates a fixed radius around the Target. I have not been able to figure out how to add this animator to the scene's current active camera. I have tried the following:
And I notice no change to the scene camera in my scene. |
||||
|
You forgot a 'new' there. Use something like this instead: var newAnimator = activeCamera.addAnimator(new CL3D.AnimatorCameraModelViewer(activeCamera, engine)); Also, it looks like you are having an animator already on that camera. Whatever it is, it is likely that it will interfere with the animator your are adding. Maybe you created an empty scene from CopperCube, and that's that animator which gets added automatically then. Add a camera without an animator in CopperCube, then this won't happen. Alternatively, just remove that animator from the camera. |
|