Topic: How to get the camera coordinates ?

Hello, maybe a stupid question, but there is something pretty simple that I don't understand.

If the camera doesn't move (its worldposition is 0,0) its coordinates do change when the player is moving on the map (or more precisely the map is moving below the player).

So how do I get the lat/lng of the center of the map, or of an object (not a marker) on the map (in this case the Cam object).
I don't see any PM action to get this vector2 ?

Best regards, Phil

Re: How to get the camera coordinates ?

Hello.

To get the coordinates of the center of the map use Online Maps / Get Map Coordinates And Zoom.
To get the coordinates of any GameObject on the map, use Online Maps / Get Coordinates By World Position.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to get the camera coordinates ?

Alex Vertax wrote:

Hello.

To get the coordinates of the center of the map use Online Maps / Get Map Coordinates And Zoom.
To get the coordinates of any GameObject on the map, use Online Maps / Get Coordinates By World Position.

This is of course what I tried first ! But I understand why :  there is only 1 decimal in the coordinates displayed in the FSM variable, so as my terrain is not very large, I didn't see any change in the value when dragging the terrain !

PunBB bbcode test

Maybe you should add some decimals in the field to avoid this risk of question... I spent a lot of time on this issue...

Thanks
Phil

Re: How to get the camera coordinates ?

Vector2 is a structure that contains the x and y fields.
https://docs.unity3d.com/ScriptReference/Vector2.html
These fields are of the float data type (32bit, ~6-9 digits).
https://docs.microsoft.com/en-us/dotnet … eric-types
Vector2.ToString() displays only one number after the decimal point, while this in reality has a lot more precision.
It's very easy to check this: display the value of the field x or y.
And I cannot change the display of Unity datatype in the third party asset.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to get the camera coordinates ?

Thanks for these explanations !
Phil