World map editing in blueprint

Hi,
i would like to know how to get list of meshes in my world.

i want select a radius around character, and pick meshes that have their Z higher than Player Z + Player Height and make them invisible. (Feature for Top/Down game mode)

I am using blueprint. Thanks for answers.

Hi, you can do “Get all Actors of Class” and then do a “ForEachLoop” on that list, checking the location vs your player location. That said, you could do this much cheaper in your materials using the vertex shader without any loops at all.

It would look like this. Use “Object Position” and then add"object radius" and component mask for the “B” channel. That gives you the highest point of the meshes bound sphere.

Then you need to create a Global Material Parameter value for your player Z+PlayerHeight value. Do ObjectZ-PlayerZ in the material and then “ceil”. What this will do is return while (1.0) as soon as the top of the mesh is above the player (with some tiny extra because the bound sphere will always be slightly larger than the mesh itself). You can adjust that with parameters as needed.

To actually shrink the mesh based on that, clamp that ceil value between 0-1 and then multiply it by “WorldPosition” and then by -1 and hook up to worldposition offset.

Alternatively you could use masked materials to create a clipping plane:
clipping plane

Or follow something like this “location based opacity” tutorial:
Location Based Opacity Youtube tutorial

whad did he added into blue print at 1:55? i dont know where he git it, it just appeared there…

i think he pressed keyboard hotkeys many times and i was confused… :smiley: anyway, i tried the “Get all Actors of Class” thing… im pretty sure tjat is what i was looking for, thanks

spheremask node. Its actually in the material editor at that point. The video gets a bit blurry at that point, I don’t think its streaming at HD for me.