Closed MostlyBen closed 3 months ago
Upon further experimentation, I see it's an issue with my code.
that.to
in @onDragging
is not a global position. It is offset by the transformer's position, and the offset changes when the transformer is moved.
So, to account for this, the @onDragging
function should be:
links.transformer.tags.homeY = that.to.y + links.transformer.tags.homeY;
When a bot has a
transformer
tag (or link) and uses custom dragging to move its transformer, the@onDragging
tag receives unexpected values inthat.to
.Steps to Reproduce
transformer
tag to🔗{other-bot-id}
@onDrag
:@os.enableCustomDragging();
@onDragging
:@links.transformer.tags.homeY = that.to.y;
Both bots will flicker between several homeY values.