Raada
July 8, 2026, 4:07pm
8
Hi, this bug is causing issues with a behavior I’m trying to implement today. Also, it’s pretty interesting that this bug has been around for so long. I guess it carries quite a bit of technical debt.
When using the width and height of an object inside the “onCreated” function - it’s values are the initial values of the object in the visual editor. Not the values given to the object, when actually used on a scene.
For example:
When the object boundaries are set to 100x100px inside the custom object visual editor
and
The custom object is used elsewhere on a scene and is resized there to say 200x300px
The values obtained by Object.Width() and Object.Height() in the “onCreated” lifecycle me…
So I’ve made a simple Behavior that use Object.Angle() in his formulas and I’ve seen something that seems a Bug to me.
I’ve made this simple project that read the Angle of a Sprite with Object.Angle() from the Event of a Scene and another one from the “OnCreated” of a Behavior and this is the result:
Before pressing a Key
[05.10.2021_12.31.48_REC]
After a Key is Pressed
[05.10.2021_12.32.20_REC]
The angle from the Behavior is always 0 and return to normal only using Object.Angle() from t…
I’m writing this comment just to bring it back to everyone’s attention. Thank you