I have a landscape and used the paint (6 different materials).
Now I want to read from the landscape what type of paint is below a character’s feet. Based on that I want to play different sound for steps (e g walking on gras sounds different than stone), limit character speed, possibly change movement animation, and much more.
Is there a way to read the type of paint at a defined coordinate (x,y) from a blueprint?
Nope. If you want your footsteps to produce the proper sound, then you have to trace each step. Imagine having a grass material, but you’re walking on a wood floor, sidewalk, dirt patch etc.
If there’s no possible chance of stepping on a surface other than the painted landscape, then you could set up overlap volumes to switch the sounds. This would probably give you more headaches than it’s worth.
Line/shape traces are fast and efficient, but they do run on the CPU which will pause the game threads execution during the trace. You can typically get away with 50± per frame, BUT that depends on all other logic complexity per frame, per game. Thus performance varies game to game. In general a trace should execute in 0.001ms
Bottom line… if a trace per step is having a huge impact on your games performance you really need to take a look at your games overall performance. Time to start profiling.
When you set it up it usually doesn’t matter. You’ll get a few missteps - it’s inconsequential.
If you resorted to using the existing trace result due to performance issues,
a) you are doing something else very wrong and
b) you just have to live with the limitation. It’s one trace, not 2.
In professional or even indy projects you usually have foot Ik going that gives you 2 traces anyway. As well as a way to make the sounds play without a notify (using the curve).
What you can count on, always, is for things to go like they did in .22 (if I remember the version correctly) where we were left for around 4 months without a landscape physmat response due to whatever “improvements” they made at the time