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
I have tracked this issue to openfl 3.1.2 specifically. When doing a simple check while dragging an object around the screen to detect if it leaves an area, I noticed the object was no longer updating its position (immediately after updating to openfl 3.1.2 from 3.1.1).
Further investigation shows that if myObj.width (or height) is called anywhere (even in a trace) that object fails to update its position. Refer to this simplified example.
//called every frame
myObj.x = mouseX; //update obj x coord to track mouse x
Simply calling myObj.width (even inside a trace) causes myObj to fail to update its x position, so it stops dragging altogether if width is ever called on it.
The text was updated successfully, but these errors were encountered:
Also want to mention that the numbers get_width and get_height return are accurate, it's just that calling either of these properties results in the object itself becoming unmovable.
Thank you! I was able to find a solution to this, there were scrollRect changes (improvements) recently that adjusted how some of the matrix transforms behave. This was one last place that hadn't been updated 😉
I have tracked this issue to openfl 3.1.2 specifically. When doing a simple check while dragging an object around the screen to detect if it leaves an area, I noticed the object was no longer updating its position (immediately after updating to openfl 3.1.2 from 3.1.1).
Further investigation shows that if myObj.width (or height) is called anywhere (even in a trace) that object fails to update its position. Refer to this simplified example.
//called every frame
myObj.x = mouseX; //update obj x coord to track mouse x
if( myObj.x - myObj.width < 0 ) //offscreen left
{ //do something }
Simply calling myObj.width (even inside a trace) causes myObj to fail to update its x position, so it stops dragging altogether if width is ever called on it.
The text was updated successfully, but these errors were encountered: