You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our code we try to change the position of an entity continuously by a game-pad input.
First, we call getWorldTransform to get the current position, and then update it using setTransform. Visually we can tell that the entity is correctly updated and its position is changed.
Then, on the next frame, we call the same code again, but this time getWorldTransform doesn't return the value we updated, but the previous one.
To Reproduce
Add an asset / entity to the scene (ie. it has no parent, and the entity you're changing is a direct child of the scene / world)
auto rootEntity = asset.getRoot();
auto rootInstance = transformManager.getInstance(rootEntity);
auto prev = transformManager.getWorldTransform(rootInstance) // [0, 0, 0]
transformManager.setTransform([0,1,0]) // (simplified)auto updated = transformManager.getWorldTransform(rootInstance) // ⚠️ this is still [0, 0, 0]
Note: this behaviour is also true between frames. So when calling
auto prev = transformManager.getWorldTransform(...) // [0, 0, 0]
transformManager.setTransform([0,1,0])
engine->render(...)
auto updated = transformManager.getWorldTransform(...) // ⚠️ this is still [0, 0, 0]
Expected behavior
The world position be updated after calling setTransform
Screenshots
n/a
Logs
n/a
Desktop (please complete the following information):
OS: iOS
GPU: Apple GPU
Backend: Metal
Smartphone (please complete the following information):
Device: iPhone 13 Pro
OS: iOS 17.4
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Actually we don't (thanks for checking!).
Let me try to build a reproduction in the filament samples - then it must be because of something else we are doing in our code!
Describe the bug
In our code we try to change the position of an entity continuously by a game-pad input.
First, we call
getWorldTransform
to get the current position, and then update it usingsetTransform
. Visually we can tell that the entity is correctly updated and its position is changed.Then, on the next frame, we call the same code again, but this time
getWorldTransform
doesn't return the value we updated, but the previous one.To Reproduce
Add an asset / entity to the scene (ie. it has no parent, and the entity you're changing is a direct child of the scene / world)
Note: this behaviour is also true between frames. So when calling
Expected behavior
The world position be updated after calling
setTransform
Screenshots
n/a
Logs
n/a
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
n/a
The text was updated successfully, but these errors were encountered: