promontis Posted June 2, 2018 Share Posted June 2, 2018 Hi there! I'm currently trying to animate the ArcRotateCamera setTarget method. I have several meshes and when selecting one of the meshes I set the camera's target to that mesh. When I don't animate the setTarget it slightly 'jumps' to a new position in order to better look at the target, which is fine. However, I would like the camera to smoothly do this in an animation. I've tried animating the alpha, beta and radius, while copying parts of the code from https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.arcRotateCamera.ts, namely the rebuildAnglesAndRadius, but I don't get the same values. Thus, when I set the target after the animation, it still slightly (albeit less then previous) jumps. I do need to set the target in order for future camera movements (by either mouse or keys) to continu looking at the target. Should I extend the ArcRotateCamera and build some custom logic in there? I think the problem lies within the subtractToRef call and not being able to properly update the _computationVector from outside the class (in my own code). Could you point me in the right correct? Thnx! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.