Get Height anywhere
Shader World provide a simple callable blueprint function which allows you to request the height of the terrain anywhere
After selecting the Shader World you want to request, simply send a set of points with the X and Y coordinates you want to precisely know the height of, and assign a callback function that will be called upon processing.
You can request up to 25 points at a time right now, but this number could be exposed for futher customization. It means almost 25 points per frame in the best case scenario, which at 30/60fps respectively means a best case scenario of 750/1500 samples per seconds.
With 4 control points for a boat, updating at 30 FPS, it would means over a hundred boats at the same time.
If you intend to request points from multiple sources, you would have to centralize those sources before interacting with Shader World, as you can only have one callback assigned.
An alternative would be to replace this callback system by a set of TOptional variables, which would be a drastic change from the current system, merely adding a layer of book keeping of requests.
An example of height request can be found on the reference demo map, if you open the BP_read actor which is requesting height from the water surface over 30 times per second.
Last updated