I found a method on the API documentation that I need to use but when I try to use it I got the typescript error message that Property ‘onTargetFramingAnimationEndObservable’ does not exist on type ‘FramingBehavior’.
Im not sure why. Im on the version 4.1.1 of the babylonjs/core npm package
If the method is deprecated or doesn’t exist anymore I need something to tell me when the animation of the framing has ended.
With camera:any there are no more TS errors in VS but the example still doesn’t work.
I have the same error in both cases, camera._framingBehavior and camera.framingBehavior
Yes but sadly I cannot use a beta version of babylonJs in production for my project. I will wait for the official release and find another way for now.
Heya, this was added from a PR I made a few months ago so is only available on V5… But for version 4 you can create the FramingBehavior and call zoomOnMesh manually like below to get the same callback as a work-around until V5 is released.
It works in Typsescript too on V5 but the framing behavior is part of the ArcRotateCamera, so on the default PG it needs to be changed from FreeCamera to work, like below.
EDIT: ooh I see you used ArcRotateCamera too, can you post the PG where it didn’t work on V5 with TS please and I’ll try to fix it?
It works fine with 5.0.
I was a bit confused thinking that is have been working in 4.2.0 but not in 4.2.1.
Now the mystery revealed. so it works ONLY with 5.0, as I understand.