Space Engineers

Space Engineers

XYZ Position
13 Comments
Nob-Stop 2 Nov, 2019 @ 11:51pm 
it dosnt work now
password 3 Mar, 2015 @ 9:40am 
Would it be possible to have this script written to an LCD Panel?
0X800007D0 8 Jan, 2015 @ 6:34pm 
Thanks for the code, it makes for a great starting to place to make a program that finds velocity, acceleration, and orientation among other things.
Elo 8 Jan, 2015 @ 2:05am 
*FREE TIP -- get in the habit of Caching Data meaning if you get a vaue you are going to need to lookup soon store it so you dont have to spend all the tiem and resources looking for it again every time
EXAMPLE

--BAD
double x = Math.Floor(blocks .GetPosition().GetDim(0));
double y = Math.Floor(blocks .GetPosition().GetDim(1));
double z = Math.Floor(blocks .GetPosition().GetDim(2));
var Location="X: " + x.ToString() + " Y: " + y.ToString() + " Z: " + z.ToString();

--BETTER
var BlockPosition=blocks .GetPosition();
double x = Math.Floor(BlockPosition.GetDim(0));
double y = Math.Floor(BlockPosition.GetDim(1));
double z = Math.Floor(BlockPosition.GetDim(2));
var Location="X: " + x.ToString() + " Y: " + y.ToString() + " Z: " + z.ToString();

--
Even better ...not as pretty
var Location=blocks .GetPosition().ToString();
Elo 8 Jan, 2015 @ 2:05am 
i fixed this script to be more eccicient and outlined a few things to help people depending on needs... over all major improvment

hope this helps you guys gain some knowledge http://pastebin.com/mj3YPG4W
Booperius 6 Jan, 2015 @ 2:25pm 
YAY no more having to build obnoxious infinite range beacons for Nav in Servers...
MegaMech 3 Jan, 2015 @ 2:41pm 
Yea it's great that we can use some System functions. Math probably even Clock. Convert.
Such simple but great tools.
It will be absolutely necessary once I start telling my drone to face a certain direction and then figure out which thrusters to activate.
Ben Snow 3 Jan, 2015 @ 2:33pm 
BTW would you mind if I use your code in my own? I made a script for target practice drones, and I don't want them to go away too much from the point they were spawned...
Xaiier  [author] 3 Jan, 2015 @ 2:22pm 
Thanks guys, I was under the false impression that I couldn't do something that simple due to things being blocked. It's updated now.
MegaMech 3 Jan, 2015 @ 1:55pm 
@Ben Snow
He could also convert the strings to int or other type
lol you beat me to it! I was just going to mention that he didn't have to round... Awkwardly.
Ben Snow 3 Jan, 2015 @ 5:34am 
You could use Math.Floor() instead of awkward rounding if your x was double instead of string... try this, it is the same thing but "fixed": http://pastebin.com/yHEgX9Zc
Xaiier  [author] 2 Jan, 2015 @ 12:02am 
Feel free to use any part of the script for whatever purpose. :)
kor kilden 1 Jan, 2015 @ 11:54pm 
I borrowed parts of this script to show rotation angle of rotors, would you like a copy or may I submit it? I know yours is pretty basic, but I know no C#.