Speedometer doesn't show up pls help

I made a speedometer but it doesn’t show up does anyone know how to fix it





It’s not completely wrong, but almost.

First.
Does it really need to use on tick?

Can you not just re-purpose the tick that already exists and handles the physics (to do this you use cpp).

Better yet. Can’t the widget onlick just handle it?
Yes it can.

Second.
A function with a cast is an immediate no.
Usually, the point of creating a function is to avoid casting.

Third.
What’s the point of getting velocity normalized to then multiply it again?
Sure it’s not like it’s a lot of overhead to execute the math, but still wondering why.

Fourth.
The velocity returned from a GetVelocity node is in a specific format.
All you need to do is multiply it by the correct value above 100 to get either meters or 1000 to get km.

If you read the cpp you can find out if it’s on a per second or per frame or per whatever basis (because it could be different between physx and chaos. You should really crack open the cpp to try and understand what it’s doing)

We could assume it’s per frame, since physics are calculated each frame.
But you know what they sat about Assumptions?

Last time I made one the value returned was in cm per second. (So .036 returns kph)

Last.
You are adding to the viewport with a missing controller and expecting the widget to be on screen.
Isn’t it returning errors in the log?
Try to connect self or get player controller and add to screen properly (many tutorials on the basics of that, but what you got doesn’t track with what I remember).

Additional note.
The widget can literally just be fed a reference of the vehicle and handle all of its math inside the widget. Which is the proper way to do stuff. Without any casting.

Perhaps you’re simulating:

image

Rather than PIE - Play in Editor. Widgets do not show up while simulating. Another reason would that there are no visible elements in the widget or the render opacity of the root / vital elements is set to 0.

Thanks, I selected New Editor Window and the Problem was fixed

Holy ■■■■, I didn’t know I made so many mistakes I’ll try to take your advices thanks