Digital Paint Discussion Board

Development => General Development => Topic started by: mRokita on May 23, 2015, 02:17:32 PM

Title: How to get ent's origin position from locs position.
Post by: mRokita on May 23, 2015, 02:17:32 PM
Hey!
I wanted to improve my Ent Maker by adding an option to create custom spawnpoints. Unfortunately loc's XYZ isnt equal to ent's origin. How can i convert position of a LOC to ent's origin?
Is it even possible?
Title: Re: How to get ent's origin position from locs position.
Post by: Chef-Killer on May 24, 2015, 07:25:16 AM
I think there's a command for this. Try something like "position", "angle" or "angles". I don't know the correct command offhand...didn't use them for a long time, sorry :-/
Title: Re: How to get ent's origin position from locs position.
Post by: mRokita on May 24, 2015, 08:48:02 AM
I think there's a command for this. Try something like "position", "angle" or "angles". I don't know the correct command offhand...didn't use them for a long time, sorry :-/
The problem is that i have to count it in Python :[
Or its possible to do something like $position
Title: Re: How to get ent's origin position from locs position.
Post by: mRokita on May 24, 2015, 08:59:40 AM
Got it!
To get origin from a LOC, you have to divide x y and z by 8.
Example:
LOC:
-144 190 1224
Origin
-144/8 190/8 1224/8 = -18 23.75 153