Draw 2D pointcloud on HUD
Hi everyone, probably a basic question, but I'm getting a little confused here among HUDs, Widgets, Slates and so on. So, I am developing an autonomous driving simulator and I have to simulate laser scans, which basically give a map of the environment. I have already done that, but I would like to show a simplified output while I am playing. What I did was this:
See that black box in the top left? I did that by using HUD class. Each white point is rendered with DrawRect. Now, I wanted to pass the laser data with blueprint events, and I think I understood that HUD is not really thought to share data like this. So, the question is, what do you think is the best (and computationally efficient) way to do this?
NB. The point cloud itself is pretty large, like 10k points at 25 Hz, so I do not want a precise representation, I can heavily subsample it in the HUD, up to like 100- 200 points. I would also like the HUD (or whatever) to draw the data as soon as available (i.e. receiving an event from the player)
I gave it a quick go out of sheer curiosity, it does work:
This is shooting 360 linetraces around the character and draws hits to the render target every frame. Not particularly performant but it does work. Not so sure whether this is a good method but can be optimised.
Drawing rects in HUD is an order of magnitude faster, though.
If you do not need anything flashy, stick with the HUD.
Follow this question
Once you sign in you will be able to subscribe for any updates here