Space Engineers

Space Engineers

Single-Camera Rangefinder [Obsolete!]
19 Comments
ZerothAngel  [author] 7 Jul, 2017 @ 12:39pm 
I just published an update to make that possible. The default behavior hasn't changed though, so you will have to edit RANGEFINDER_TARGET_FORMAT as mentioned above.

For example:

const string RANGEFINDER_TARGET_FORMAT = "{3}";

will just output the raw range (and only the range) to all text panels in the CM Target group. You can add whatever embellishments you like, like "Range: {3} m" or (what I would use) "Range: {3:F2} m" (the latter will round to 2 decimal places)
Quartofel 7 Jul, 2017 @ 12:02pm 
Will you consider displaying the range on the LCD instead of coordinates. "Dry" range would be more useful in combat scenario.
jokerace45 20 May, 2017 @ 6:10pm 
Is this Script still relevent ? Or has it become outdated ?
ZerothAngel  [author] 12 Dec, 2016 @ 1:21pm 
@DeeBee If you're familiar with C#, have a look at the TargetAction method.

Otherwise, check out this version of the script [gist.github.com] which outputs to text panels the same thing that is displayed in the terminal. It's untested though and I have no plans to support that modified version.

I haven't had a chance to play around with the Raycast stuff in the dev branch, but depending on how far cameras can scan, coincidence rangefinders (such as this script) may be obsolete. But I'll wait til it hits stable.
Manic 12 Dec, 2016 @ 6:46am 
This is complex, please teach my math class
Your Pal Deebs 11 Dec, 2016 @ 9:20pm 
How do I print out range on an lcd?
Manic 20 Apr, 2016 @ 8:06pm 
okay, That revenge will happen soon... bwahahahahahhaa
ZerothAngel  [author] 20 Apr, 2016 @ 7:54pm 
The coordinates are the same as GPS coordinates.

But if you want an actual GPS coordinate that appears in your list, you have to make the edit I mention above to RANGEFINDER_TARGET_FORMAT and then look at (or edit) the text panel after you get your range.

Unfortunately, that's the only way to pass GPS coordinates from scripts to players.
Manic 20 Apr, 2016 @ 7:49pm 
Before I use this, will it give me GPS coordinates? Is that possible? I have an orbital bombardment frigate and oneof my friends got me kind of mad so I need some accurate guided revenge...
ZerothAngel  [author] 2 Oct, 2015 @ 11:31am 
Thanks for letting me know. It should be fixed for the time being.
Devlah 2 Oct, 2015 @ 4:43am 
Tajin 26 Aug, 2015 @ 8:32am 
Interesting script. I guess it could also be adapted to work with 2 manually targetted turrets, instead of moving the ship.
doofy 22 Aug, 2015 @ 8:48am 
I like this script, good job :D
RyansPlace 21 Aug, 2015 @ 3:34pm 
@Z- Rather than tie up your workshop item with this convo, it would be easier if I demo'd it for you. Friend request coming your way.
ZerothAngel  [author] 21 Aug, 2015 @ 3:01pm 
@RyansPlace What would be special about a rangefinder for a gravity cannon? I've attached my rotor-based rangefinder onto my own gravity cannon. It looks horrible, but it works.

I guess I can see some improvement by using rotors on both sides though.
RyansPlace 21 Aug, 2015 @ 6:54am 
Z- Modifying Whip's shortbow to test a concept seems to be a trend. I converted his build to test a VTOL concept.

I like your range finders. I've been trying to get one to work using cameras and projected, adjustable reticles. You are way ahead of me on this. Would you be interested in working on a third type of rangfinder for gravity weapons?
Whiplash141 19 Aug, 2015 @ 1:15pm 
I knoww... I cant even get the stock shortbow to move without oveloading to oblivion :/ The small thruster nerf murdered my fighters lol But anyways, back to the script: this is very well done! I wish i understood the math behind it, but I think a few sessions of breaking things with my programming prowress (read as: "typing random stuff") might help me understand it a bit better :)
ZerothAngel  [author] 19 Aug, 2015 @ 8:18am 
I dusted it off last night and then realized the last update sorta broke it. A single battery can't power a large thruster anymore, let alone two. So the acceleration is really bad. Without good acceleration, it barely homes in on its target... and if it does, it just casually bumps into it. ;)

Hoping for a battery balance pass soonish. They should have buffed them along with reactors.
Whiplash141 19 Aug, 2015 @ 12:43am 
Bruh! Where be this modified Shortbow? :)