I’m trying to change and read positions and absolute positions of objects in a scene, but seemingly the absolute positions module is just not working. Please see the following PG for example:
Is it a bug or am I doing something wrong?
setAbsolutePosition was not used as it should: (l.31) https://playground.babylonjs.com/#4F33I3#25
That’s said, I don’t know why the
sphere1.absolutePosition is still equal to [0,0,0] (l.29), doesn’t should be [2,0,0]?
Actually it’s weird:
- when opening the playground, then once the scene loaded opening the console, I’ve the correct
sp1 absPos values:
- if I click on Play button, values are now wrong:
- BUT! if I unfold these values, they’re right… what the fuck?
And it’s not only due to my Firefox Nightly, here same bug in Chrome:
Same when using
Yeah, sure, thanks, just forgot it’s not a property but a method, just too tired already)
And yes, it happened it is the same with my browser. The correct values are only in the unfolded view but it is only the initial string that shows wrong values.
You should clone the vectors when dumping them in the console, else the properties are reused and updated by subsequent function calls.