Space Engineers

Space Engineers

[OUTDATED] Whip's Graphical Velocity Indicator
66 Comments
Voss 26 Aug, 2019 @ 4:38am 
legacy favorite
AnsontheToad 11 May, 2017 @ 9:31pm 
Whip, are you going to update this script with the advancements you've made with your artificial horizon script?
Dr Cedric 15 Jan, 2017 @ 11:13am 
@McBain - when you open the terminal for the programmable block you want to use, click the edit button, then on the bottom click the browse workshop button. A list of your scripts should pop up and you can double click the one you want. Click check code button, then remember&exit button.. done!
McBain 2 Jan, 2017 @ 4:49am 
Sorry guys, noob question. Where can I find the actual script code (Step 1: "Make a program block and put this code in it")? I subscribed in the Workshop but I can't find the code anywhere.
... I feel stupid...
zen 11 Sep, 2016 @ 6:01pm 
This is quality work. I like the multi-colored symbols. I've been using another for a long time and while it matches the rest of my industrial looking displays- I can't help but think a real HUD would make things visually simple for ease of understanding.

I look forward to the magnitude-less version as it's the style I've been using up until this point.
Caffeinix 12 Aug, 2016 @ 12:10am 
Awesome! Thank you! :D I also use your artificial horizon mod, so I'm very excited by this!
Whiplash141  [author] 10 Aug, 2016 @ 10:08am 
@Caffeinix:
Upon playing around with the idea, I've decided to implement your suggestion :P

The magnitude-less vector is much more useful for my artificial horizon, so I have already implemented it there. I figured I might as well implement it in this one as well. I will update it soon.
Whiplash141  [author] 10 Aug, 2016 @ 10:06am 
@o RawRaSauRus o:
Yes, on the timer there is a check box to turn off the timer noise. See time stamp 2:18 in my video :)
o RawRaSauRus o 10 Aug, 2016 @ 6:06am 
Need Help it all works fine, apart from the sound the timer block is making when the prommgram is running is there a way to turn that off ? its like its running the code so fast i just have a high pitch sound that seems tobe coming from the timer
Whiplash141  [author] 13 Jul, 2016 @ 12:06am 
@Caffeinix:
"Also, wouldn't increasing the max speed make the problem worse?"
Yes, I misspoke.

However, I am not interested in discarding information about magnitude. I might go back and add a toggleable function. Depends on how much work it is.
Caffeinix 12 Jul, 2016 @ 11:51pm 
@Whiplash141 (cont'd): To give a concrete example: with your script, if I am moving forwards at 5 m/s and am drifting to the right at 5 m/s, I believe your script will display the indicator 1/20 of the way to the edge of the display, quite near the center (assuming a max speed of 100 m/s). However, since my velocity vector is 45 degrees away from the horizontal, I would prefer to see the indicator halfway to the edge of the display. It would look the same if my velocity were 50 m/s forward and 50 m/s to the right (so it does discard information about the magnitude).

Again, I'm not suggesting that your way is "wrong", just that it differs from my expectations based on other such displays, and I'd love to have the option. And if I'm missing something here, please let me know.

Also, wouldn't increasing the max speed make the problem worse? The deflection of a small sideways velocity would be even less.
Caffeinix 12 Jul, 2016 @ 11:51pm 
@Whiplash141: I think we're talking past each other a bit. You are correct in that you're projecting the 3D vector onto a 2D display, which preserves information about the vector magnitude. That's totally reasonable for many, but not all, applications. Nav vector displays in, e.g., Kerbal Space Program intentionally discard the information about the vector magnitude in favor of displaying the angle such that the deflection of the indicator from the center of the display is equal to the angle to the velocity vector, regardless of magnitude.
Whiplash141  [author] 20 Jun, 2016 @ 11:52am 
Ahh... I might hardcode a method to automatically set that based off of the selected grid size so that people dont have any issues :) Glad you got it working though!
Ankhrodium 20 Jun, 2016 @ 9:19am 
Just found the issue... i didnt put the font to 0.4, because i thought it was already the default xD. sorry!
Whiplash141  [author] 19 Jun, 2016 @ 6:47pm 
@Ankhrodium:
In the video around the 2:41 you can see the debuging output of the program. Is the program reporting any errors? If so, please take a screenshot and leave a link here :)
Ankhrodium 19 Jun, 2016 @ 6:00pm 
Yes i did everything. i still see only grey dots.
stoicboss101 19 Jun, 2016 @ 5:59pm 
ownership of all assciated blocks on ships designate whether or not the timer has access to control them. any script on a loop generally requires a hard loop via. timer block. if your screens dont have your ownership tag it has not refference part.
Whiplash141  [author] 19 Jun, 2016 @ 5:37pm 
@Ankhrodium:
Also check ownership on all your blocks.
Whiplash141  [author] 19 Jun, 2016 @ 5:36pm 
@Ankhrodium:
Have you started the timer?
Also sometimes LCDs bug out and you need to hold alt, look all the way right, then all they way left, and then recenter and the LCD screens will update.
Ankhrodium 19 Jun, 2016 @ 5:32pm 
I just tried it and it only shows grey points on the lcd... and it isnt moving.
stoicboss101 15 Jun, 2016 @ 12:51pm 
LOL russian text haha
Whiplash141  [author] 14 Jun, 2016 @ 2:49pm 
@tomkrist:
Have you started the timer?
tomkrist 14 Jun, 2016 @ 6:53am 
I have setup everything like you said in the video. It displays correct with velocity at 000. But the marker is not moving and the numbers is 000 all the time.
Whiplash141  [author] 13 Jun, 2016 @ 6:56pm 
@VIVISEKTOR:
From google "translite" as you spelled it:
"let me fuck you understand or not , google translite to help"

I'd prefer you keep all fornication to yourself.

"Translited" your other message as well:
"pindos"

So hurtful...

Don't even bother commenting here if you are going to be belligerent.
VIVISEKTOR 13 Jun, 2016 @ 12:37pm 
да мне похуй понимаете вы или нет, google translite в помощь
Whiplash141  [author] 12 Jun, 2016 @ 8:10pm 
@Syrikzero:
Hope you enjoy :)

@Clanner Jake:
This would be quite a sight :)

@tomkrist:
Open a program block in the terminal. Click the workshop button bottom right.
Whiplash141  [author] 12 Jun, 2016 @ 8:09pm 
@Caffeinix continued:
"I'd think you would just normalize the velocity vector"
No. That removes absolutely all visual data about the magnitude of the speed.


"take its angle against the normalized facing vector in pitch and yaw, and use those angles to display the crosshair. If the velocity vector has zero magnitude, you'll have to pick a direction arbitrarily"
You don't even need to touch angles at all. Picking a direction arbitrarily is a terrible idea.

" I'd love to see a true vector indication using it"
From the description: This code creates a colored graphical representation of your velocity vector and displays it on a screen

Again let me state: This code presents a 2-dimensional representation of a 3-dimensional velocity vector. The length from center to any point along an axis is a vector projection of that velocity onto that axis.




Whiplash141  [author] 12 Jun, 2016 @ 8:01pm 
@Caffeinix:
"Could you make a version of this that actually shows you the *direction* of your velocity vector?"

It already does. If you are moving right the indicator is along the right axis. If you move down it is on the down axis. If you move forward it is green. If you move backwards it is red.

"yours shows relative velocity along each axis, which is not the same thing"

It is absolutely the same thing. The position on the vector on the screen is a two dimensional projection of the three dimensional vector.

"(and is less useful if you're moving slowly, since it will always appear that you're moving "forward" even if you're travelling at 90 degrees from your facing direction."

Increase the resolution and the max speed then. It will make the code more sensitive to tiny movements.
tomkrist 12 Jun, 2016 @ 7:18pm 
How do i find the code ingame?
Clanner Jake 12 Jun, 2016 @ 7:16pm 
if you could get some more help, you could make one that used custom textures i'm sure, or even make this with a holographic display, with an arrow... people would scream how boss that would be. my first script sub :).
Solargoth 12 Jun, 2016 @ 5:59pm 
I wonder what this would look like with my cockpit. *Suscribed*
Caffeinix 12 Jun, 2016 @ 5:13pm 
Could you make a version of this that actually shows you the *direction* of your velocity vector? As you said, yours shows relative velocity along each axis, which is not the same thing (and is less useful if you're moving slowly, since it will always appear that you're moving "forward" even if you're travelling at 90 degrees from your facing direction.

To do that, I'd think you would just normalize the velocity vector, take its angle against the normalized facing vector in pitch and yaw, and use those angles to display the crosshair. If the velocity vector has zero magnitude, you'll have to pick a direction arbitrarily (probably forward) or even better, not display the crosshair at all.

Your display code is ingenious, so I'd love to see a true vector indication using it. :)
OssomUmbra 12 Jun, 2016 @ 12:48pm 
Now all I need is a transparent LCD screen!
::.:...:.:.::. 11 Jun, 2016 @ 5:55pm 
Cool, that sounds interesting.
Whiplash141  [author] 11 Jun, 2016 @ 5:53pm 
@Stockton:
I'm working on an horizon indicator, and I already have a bearing code on the workshop. Altitude is not accessable to programs and I doubt that I would be able to combine all those on one screen as making stuff with non-monospaced font is quite dificult.
::.:...:.:.::. 11 Jun, 2016 @ 5:47pm 
Very cool. Would you be able to make an artificial horizon / compass bearing / altitude / velocity multifunction display, like in a modern aircraft?
Whiplash141  [author] 11 Jun, 2016 @ 2:14pm 
@Kylo Ben:
Yes! The setup is EXACTLY the same as in the video, just for a large ship! The optimal text sizes should work too :)

@Zankar:
G-force has to do with acceleration. The position of the velocity indicator represents its relative velocity along that axis of travel. So if your indicator is halfway up the positive y-axis axis, that means that you are traveling 50 m/s up.

@LookAtMyHorse:
Thanks for the catch :)
And I'll see what I can do. Drawing is quite challenging with this system

@Uhthis:
Thanks, I wanted to make sure that I didn't break stuff on accident while coding. I guess it also helps users XD
Uhthis 11 Jun, 2016 @ 11:34am 
Nice job with the code! Really love the "no touchey" parts lol
LookAtMyHorse 11 Jun, 2016 @ 11:10am 
"control, or passenger sear that" typo
would it be possible to make a mode with a straight line between the middle and the cross?
Zankar 11 Jun, 2016 @ 10:39am 
Looks more like G-force meter than velocity, but still cool.
Khaste 11 Jun, 2016 @ 8:58am 
gorgeous mod! Brought something (as marcello said) that is mod included, into the vanilla game, which I adore. I always love building in vanilla, and this script just adds an awesome depth. Nice work! Does it work with large ships? I've been seeing that a lot of visual scripts (ie radar mods) will work on small grids, but on large grids they break
Whiplash141  [author] 11 Jun, 2016 @ 3:34am 
@gripenblau:
Thank you :)
gripenblau 11 Jun, 2016 @ 2:55am 
raely nice :)
Dog Cop 69 10 Jun, 2016 @ 6:05pm 
just trying to help
Whiplash141  [author] 10 Jun, 2016 @ 5:58pm 
@Doge ドージェ:
I have better ways to spend my time.
Dog Cop 69 10 Jun, 2016 @ 5:39pm 
*language* to english on google
Whiplash141  [author] 10 Jun, 2016 @ 2:56pm 
@VIVISEKTOR:
I'm sorry, I can't read that language lol
VIVISEKTOR 10 Jun, 2016 @ 2:43pm 
пиндосы
Marcelo ACFM 9 Jun, 2016 @ 8:28am 
@Tadayoshii-kun, @qwerty8783, The helmet mod by Digi already has that functionality, is very useful for fighters. It shows a sphere in the bottom center on your HUD with a 3D arrow that points in the direction of your vector and elongates the faster you go and shortens when you decrease speed.
Marcelo ACFM 9 Jun, 2016 @ 8:26am 
Why you no tell us you had birthday? Now seriously, happy birthday!