Unity Scene Dimensions/Position

Hello all.

I’m a newcomer to the Unity scene, and thus far, I am really enjoying it. However, I do have a questions: In short, is there a way through the editor to find out the dimensions of an area? My reasons are the following:

I have been tasked with creating an area map view for a game (I just joined the team). The plan is to translate the player’s position in the game onto the area map, including orientation. I have the orientation piece working, but if I don’t know the actual size of the scene/area, then I cannot perform the position calculation.

Another small point is a question of the x/y coordinates. I’m currently using Object.transform.position.x and Object.transform.position.y to get these values. However, as I’m printing them to the console while debugging, I notice some negative values in there, depending on how far I move the player. I would think the values would always be positive, which clearly complicates things as well.

At any rate, I thank you for taking the time to read this, and I look forward to continuing to be a part of this community.

Thank you.

The origin is (0, 0, 0). You can go as far as single-precision floating-point allows in any direction from the origin, which includes negative numbers.

–Eric

Thank you, that is very good to know, regarding the origin. Is there any way to calculate where the origin is, relative to the scene itself? Or, even in the scene editor, is there any “origin” object? Or, does it really just come down to where you place your area and such in the scene? I guess one way would be to make sure when creating it, to make sure the origin is at the corner (i.e. bottom left) of the area? Sorry for all the questions, just trying to get a handle on how things work.

Also, does anyone know about how to calculate the dimensions of the scene?

Thanks again.

The origin is (0, 0, 0)…that’s pretty much it. There’s nothing you have to calculate, because that’s what it is; it’s a mathematical concept, not an object.

–Eric