Open Shiranuit opened 6 years ago
I'm going to classify this as "sub-optimal intended behaviour". I'm very aware that this is a limitation, but it's also something I'm comfortable sticking with for the time being.
I've a couple of plans for the future of terminal glasses, which make this sort of problem much harder to solve:
I'd quite like the ability to project a 3D overlay for the entire world, though I still need to think about how that's implemented. This means any canvas whose origin is outside the render distance will not be rendered (as we will not be transferring data for it).
Leading on from that, I also want a "should this be drawn" check which is incredibly cheap - if there's 20 odd canvases on the server, each with 100 objects, that's rather a lot of "in range" checks to perform.
At some point I'll be adding the ability to define sub-groups, with nested items and some transformations. I'm not sure whether I'll allowing rotations, but it does make the "is this within range" a bit more painful.
It's possible I could just avoid doing such checks at all and render everything, though that then has a whole set of other issues with performance.
That being said, I'm definitely open if people have alternative ways this could be managed - I'm aware it's unideal, but it seems to be something which won't end up being a pain if I need to extend things later. It's generally easier to remove restrictions than add them back in.
Hey, it's me, again x)
So I've found an issue with the render distance of every objects 2d/3d when you set the point of origin with
create(pos:table)
orrecenter()
orrecenter(pos:table)
The render distance of the objects are based on player view distance and the player distance from the point of originExample:
What's happening here is that, when you are in a distance of 32 blocks max from the origin point of the canvas you can see everything but when you cross this distance the objects are disappearing
Screnshots: At 0 block distance from the origin At less than 32 blocks At more than 32 blocks
So the problem if you are at 32 blocks from the origin of the canvas, you can see a box a 64 blocks from the origin (at this point it's normal) but after 32 blocks from the origin you can't see the box This gap if even more big when you have a bigger render distance
My suggestion is to make the objects being rendered when they are in the render distance of the player from the player position instead of if the player distance from the canvas point of origin is less than the player render distance