getpos isn't specific enough - is there a way to accurately acquire the position of doors and entities?

Hey guys,

So I’m using getpos right now to get positions for NPCs and the like, but these give the standard four decimal points. What I’m asking is, is there a tool or a way in which you can aim at an entity, prop etc. (such as a door) and gain it’s precise position (i.e no decimal points) as I’ve noticed that, with the the template lua files that I’m using, non-specific vectors seem to be fine for NPC placement (as you know, people don’t tend to notice a 0.1324 change in position) but with doors and such it’s listed as a quite specific number and indeed won’t work if using decimals.

So my questions are thus:

  • It it just a case of trial and error? Can I round these numbers up or down to eventually get the actual door position?

  • Or is there another, more suitable command that I can use by say aiming at the door and getting it’s position through executing something in console?


These doors are a part of a map that I’m using (I’m not defining their position anywhere else)

Checked the wiki but couldn’t find much (probably just dumb) and did some Googling but just came back with the old getpos command

Thanks in advance :slight_smile:

Check the trace result for the entity and use GetPos() on that.

OBBCenter() I find gives a nice precise result.

Trace the door with eye trace, get entity and use OBBCenter() on it