HUD lead target indicator

Hello, I don’t know how to make the lead moving target indicator like this one: https://puu.sh/sCIXj/f5a3b8251a.png
So how to calculate HUD indicator position by knowing speed of plane(helicopter), speed of bullets and distance from tank to plane?

(refreshing thread)

Do the math based on the factors above, convert that into a worldspace (meaning where the chopper will be whe n the bullets travel that distance) then convert that to screen space (projectWorldToScreen node)

Thank you!

Can you make just simple game for me including this? O make it and post screenshots? Lead indicator is disappearing https://puu.sh/sJBnC/0a5aa9fb6a.png

Are you using a widget to draw where the TLI is? Cause your error seems graphical and fixing it depends on the method you drew the TLI on screen

Currently I am drawing it in world space. I am just learning widgets and don’t know hnow to do it now.

If there is a max distance to a target to be targeted you may look to scale a on screen widget to get smaller based on distance to target.

Such as if it’s say closest to camera scale is 1.0 and as it gets further away hate it to .1 etc.

Not sure if that’s the effect your looking for but an idea.

I’d love to see the blue print your using to draw the on screen marker.

Anybody know how to help? I don’t know how to use HUD and widgets

Its better to learn how to do it properly via HUD tby.

But if you wanna keep going the shortcut quick/dirty/easy route, show us some code and we’lltell you where its going wrong.

I don’t have any code releated with HUD. I only have that one I gave: https://puu.sh/sJBnC/0a5aa9fb6a.png

What event is this linked to? You probably want it hooked up to eventTick

I am good in learning from examples. But as I can see no one had ever published method to do that :slight_smile: . So if you can make an example for me I will be very grateful.