casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 9 forks source link

Transformed bot bounding objects fix #278

Closed Blitzy closed 1 year ago

Blitzy commented 1 year ago

This PR fixes an issue with bots being transformed by other bots not updating their bounding objects (bounding box, bounding sphere, etc). This was the cause for the bug reported in Issue #276

The DimensionPositionDecorator simply keeps track of the world position of its transformer (if it has one). If the transformer changes world position then the DimensionPositionDecorator will update the bounding objects of the transformed bot.

Before: casualos_lineTo_transformer_before

After: casualos_lineTo_transformer_fixed