Hi,
encountered some issue when testing babylon 4 alpha version (25).
Created small example but could not reproduce issue there. PG
So for me after updating camera target position, camera don’t update. Managed to find out that absolute position of camera target is not updated its still 0,0,0.
After trying to access it to log out it is updated and camera jumps to correct position.
This issue / fix was introduced between alpha version 2 and 3.
–
But i’m unable to reproduce your issue, are you sure you’re using the latest alpha? (maybe browser cache?)
There was a bug in the arcRotateCamera a few days ago which was fixed.
I think I have also this issue on one of two scene after updating to the latest alpha.
The setPosition value are a bit off when they are launched from the code. If I reapply them everything is fine.
If the target is something else than a Vector3.Zero() there is some changes.
You can see what’s happening with the pg just by commenting the setTarget or not.
You call setTarget which means that the camera is locked on a target.
Then you move it so the camera will rotate to keep the target in the center of the screen
Whate are you seeing wrong in your PG? Or waht would have you expected to see?
What I think is strange is that putting the same values give a different result.
But I understand the calculation you make.
Here first setting the target then the position give the expected result.
For me the setTarget should only rotate the camera, not changing it’s position.
This is a new behavior so that’s why I’m surprised as one application is not working properly because of this.
I can just set the target before the position but I’m not sure why doing one first should have an incidence to the other one if the base values are the same.
At least I have a solution, let me know what you think.
The problem is that it was not working correctly before And I fixed it thus what we see now
Internally the ArcRotateCamera only has 3 values: alpha, beta and radius. If we want to keep the previous position when calling setTarget we will need to save the vector3 and not jsut the alpha, beta and radius
This is not impossible of course but not sure it is worth it
For me when I think setTarget I expect it to work like a look at in 3ds Max.
I think it’s just because I’m used to work in a way that I expect it to work like that.
I don’t know if it’s the best method but that’s why I was surprised to see it work that way.