ID:2301538
 
Resolved
Multiple turfs in visual_contents now handle their offsets as transforms rather than pixel offsets, which is cleaner.
BYOND Version:512.1389
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 61.0.3163.100
Applies to:Dream Seeker
Status: Resolved (512.1390)

This issue has been resolved.
Descriptive Problem Summary:

When a parent object is transformed, that transformation is passed on to it's children (overlays, visual contents, etc). This transformation, unfortunately, happens around the child's origin instead of the parent's origin. This is not a desired result.

Numbered Steps to Reproduce Problem:
1. Create an object
2. Put an overlay / visual contents on it with an offset
3. Rotate the original object
4. Watch as the children rotate around the wrong origin

Code Snippet (if applicable) to Reproduce Problem:


Expected Results:


Actual Results:


Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:

Use KEEP_TOGETHER but this has performance overhead and it doesn't work if your overlays/visual contents span multiple planes
For overlays, you can get the behavior you want if the overlay has a transform. Pixel offsets do not get transformed.

Currently visual contents use pixel offsets. I do see however thst there would be a potential advantage to usong transforms instead--the trick is that the transform would have to be calculated based on map format and client.dir, but that's doable.
Changing pixel offsets is faster than changing transforms - You implied it and I've tested it and it's significantly faster. I don't see why you can't make it work with pixel offsets.
Pixel offsets are not affected by transforms; it's always been that way since transforms were introduced, so that can't be changed now.

The offset behavior of the turfs in visual_contents is however much easier to change, and this is the time to do it. I'm using pixel offsets for that internally but there's absolutely no reason I can't change it to use a transform internally (on the client end that should be very fast).
Lummox JR resolved issue with message:
Multiple turfs in visual_contents now handle their offsets as transforms rather than pixel offsets, which is cleaner.