#```cs

1 messages · Page 1 of 1 (latest)

pulsar marsh
#

Mapping system

wispy ridge
#

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

pulsar marsh
#

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)

pulsar marsh
wispy ridge
#

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

pulsar marsh
pulsar marsh
wispy ridge
#

It's definitely the cause of one issue. All? I'd try it

pulsar marsh
#

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

wispy ridge
#

Yeah, hopefully it all works out 🙂 Good luck

pulsar marsh
#

@wispy ridge Well that actually did nothing

#

same behavior as rotating the line renderer object

wispy ridge
#

@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

pulsar marsh
#

I thought you wanted to move rotation away from the line renderer object

wispy ridge
#

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.

pulsar marsh
#

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

pulsar marsh
#

yeah it doesn't fix it