Is there a way we can apply animation data to an ArcRotateCamera’s target and position directly by any chance?
For example, if I load in two sets of animation data from a .gltf, and I want to apply one set to “target” of the camera while apply another set to “position” of an camera? Also, I hope the camera type should be ArcRotateCamera since I need to control the radius of the camera after.
From the test I have so far, if I use for example scene.cameras[i].target = ..., I can update the camera dynamically right away which is great. But when I use scene.cameras[i].position = ..., the position won’t change dynamically until I call the rebuildAnglesAndRadius() function. But in this case I wont be able to animate the position in real-time. PS: I have also tried setPosition and setTarget and seems not working.
For position, given it’s an arc rotate camera, you’re better off interpolating alpha, beta and radius, because together these properties determine position.
ArcRotateCamera is native to BabylonJS, your unreal camera is imported as FreeCamera.
After looking at the hierarchy of your scene, I noticed that you unreal camera is nested under some nodes and you’re animating the nodes rather than the camera object.
if you want to use ArcRotateCamera, you need to write some custom code to convert these animation to alpha, beta and radius
else you can use a FreeCamera, but you need to take the parenting into consideration in order to figure out the correct position and rotation values
Also, just saying, scaling the camera is a bad practice.