#```cs
1 messages · Page 1 of 1 (latest)
This can be greatly simplified by offsetting the map locally by the additive inverse of the scaled player XZ position, instead of iterating over every points.
e.g. player is now at 10, someY, 5, offset the map locally by (-10, 0, 5) * mapScale and it'll be centered relative to the player
From your first screenshot, the z axis of the selected object was pointing towards the handle of your tablet. If the object selected was the line renderer, then that is an incorrect setup. If player's forward is intended to be towards the upper part of the tablet, then the parent of the line renderer needs to be rotated, or you need to transform the coordinates
see, I was wondering about that
if rotating the object where the line renderer is on is right or not?
So I should input another object in the hierarchy between screen and line renderer?
(obviously, can't rotate the screen itself)
Wait, not fully clear on how you mean exactly
Sure, that's a good way to go about it
ok, so you are drawing all the points as offsets from the player, this works conceptually but it requires recomputing all points when the player moves.
You also have the option of drawing all the points as actual world positions with no regard to the player, not as offsets (but still scaled down the way you do)
If you do that, you do not need to recompute the positions every frame, you simply need to offset the transform of the line renderer
I did it like this because I figured I wouldn't need to move the pivot, but seems like instead I did a longer and harder thing to avoid doing an easier thing lmao
So do you think this is the cause of the issues? And moving the rotation to a parent will solve it?
It's definitely the cause of one issue. All? I'd try it
Lol yea ofc I'm only asking cause I'm away from pc right now, otherwise I would have done it by now.
But I'm hoping that will fix it
And I will stick an arrow in the center and some ui
Hope it all works out well
Yeah, hopefully it all works out 🙂 Good luck
@wispy ridge Well that actually did nothing
same behavior as rotating the line renderer object
@pulsar marsh Just so we're clear, when you rotate your map, you're not rotating the new parent object, are you? The parent is there only as an extra transformation so that the local axes are aligned with what you want to achieve
I am. But there was already a transformation layer like that
I thought you wanted to move rotation away from the line renderer object
No. Your line renderer is facing the wrong way. You need to rotate the parent container or you need to apply an extra rotation to the line renderer.
Ohh you're right. But it's pointing straight down
My lines are not wrong by 180 degrees
I would need to rotate y by 180, correct? But that doesn't look like it would solve the problem
yeah it doesn't fix it