I want to detect if an entity changes its position or rotation in the editor and execute a script (manual dragging the arrows or circles). I just need this in the preview so that I don’t need to refresh the preview. Something like this:
this.on("position", function (value) {
if (value) {
console.log("move");
}
});
It would be nice to have something like this, though right now those kind of events work only for script attributes. Feel free to add a feature request in engine/editor (not sure where that should live).
In the meantime you can accomplish something like that by keeping track of the last entity position in your update method, and if that has changed fire a custom event of yours: