Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I found another problem. After each room is generated, it seems that they are independent coordinate systems, which makes it difficult for me to ask the enemy to carry out some actions based on distance and position. Is there any way to unify their coordinate systems.

Looking forward to your reply

Can you please look into Transform.localPosition and Transform.position? It sounds like you're using gameObject.transform.localPosition instead of .position. If you always use .position, all coordinates should be in the world space and not in the space relative to the parent (e.g. a room).