[X] I have read and understand the suggestion guidelines
Checked for duplicate suggestions
[X] I checked for existing similar suggestions
Summary
Please add
CanvasToLayer(layer, x, y, layerZ)
and
LayerToCanvas(layer, x, y, z)
to the scripting api.
I wanted to implement in a game for performance reasons, while looking at the internal implementation I had to go many methods deep and it seems to have quite a lot of complexities I am not understanding full.
Possible workarounds or alternatives
there is probably a way to implement it ourselves, but it seems fairly complex and also it seem to require some stuff that is not easily accessible
Proposed solution
CanvasToLayer(layer, x, y, layerZ = 0)
and
LayerToCanvas(layer, x, y, z = 0)
imo it should return [x, y] so no x and y variants are need. Z should be available but optionally.
I guess it could also be ILayer.ToCanvas(x, y, z = 0) or similar, whatever you feel makes the most sense.
Why is this idea important?
This is useful for a wide variety of cases, for example world to hud position transforms.
Implementing a util function ourselves for this seems highly complex and riddled with edge cases.
Reviewed guidelines
Checked for duplicate suggestions
Summary
Please add
CanvasToLayer(layer, x, y, layerZ)
andLayerToCanvas(layer, x, y, z)
to the scripting api. I wanted to implement in a game for performance reasons, while looking at the internal implementation I had to go many methods deep and it seems to have quite a lot of complexities I am not understanding full.Possible workarounds or alternatives
there is probably a way to implement it ourselves, but it seems fairly complex and also it seem to require some stuff that is not easily accessible
Proposed solution
CanvasToLayer(layer, x, y, layerZ = 0)
andLayerToCanvas(layer, x, y, z = 0)
imo it should return[x, y]
so no x and y variants are need. Z should be available but optionally.I guess it could also be
ILayer.ToCanvas(x, y, z = 0)
or similar, whatever you feel makes the most sense.Why is this idea important?
This is useful for a wide variety of cases, for example world to hud position transforms. Implementing a util function ourselves for this seems highly complex and riddled with edge cases.
Additional remarks
No response