Ranking
There are some undocumented function which iirc deal with environment object.

Thank you so much Psycore! I've just tried get_obj_pos and it actually works. This will give you the position of env_obj 1:

local x,y,z = get_obj_pos (0)
echo ("x: " .. x .. ", y: " .. y .. ", z: " .. z)
I should be able to do this on my own now, no more help needed.

Btw: where did you find those functions?

EDIT: Sorry, I was jumping to conclusions. The get_obj_rot function doesn't work:

local a = get_obj_rot (0)
echo("a: " .. a)
Looking at the get_body_info function, I assumed it could be this:

local a = get_obj_rot (0)
echo("a.r0: " .. a.r0 .. ", a.r1: " .. a.r1 .. ", a.r2: " .. a.r2) -- and so on with r3 etc..
But that doesn't work either. Well, the get_obj_pos function is already very helpful ...
Last edited by F3hler; Dec 1, 2015 at 10:28 PM.