337592-
I would like to know how to set the DecalMaterial, one of the parameters of the SpawnDecalAtLocation function.
SpawnDecalAtLocation is called from mouse events, not from constructor.
In Blueprint, it looks like the following picture.
337593-
337592-
I would like to know how to set the DecalMaterial, one of the parameters of the SpawnDecalAtLocation function.
SpawnDecalAtLocation is called from mouse events, not from constructor.
In Blueprint, it looks like the following picture.
337593-
Hello! Where are you calling this code? In widget? Or some actor? Or another class?
PlayerController. I want to create a decal at the mouse pick point
Ok, but mouse click point is just point on 2D screen while decals are created in 3D world. So, you can deproject 2D screen position to 3D world coords or throw ray cast and get hit location in 3D world. Both methods are available in C++:
Thanks for the answer! +1