Page 1 of 1
Get the x,y,z location of a Region
Posted: Tue Dec 20, 2016 9:53 am
by DarthRubik
Is it possible to get the the x,y,z location of a Region via a lua script? Looking at the documentation, it does not look like this is possible, but maybe someone knows some trick that is not in the documentation?
Re: Get the x,y,z location of a Region
Posted: Wed Dec 21, 2016 2:44 am
by Marth8880
Nope.
Re: Get the x,y,z location of a Region
Posted: Fri Dec 23, 2016 2:44 am
by LRKfm946
You could try GetWorldPosition, but idk if that works for regions. Otherwise you could put an (invisible) object at the same location as the region and use GetWorldPosition on that.
Re: Get the x,y,z location of a Region
Posted: Fri Dec 23, 2016 2:50 am
by Marth8880
LRKfm946 wrote:You could try GetWorldPosition, but idk if that works for regions.
The only valid input types for GetWorldPosition are object and entity. With that said, yeah, you could always just do what Kfm said with the invisible object.