Download

Why isn't my grass collision working?

I am a total noob to Unreal Engine 4 and I am trying to make grass “collision”, so that it bends when touched by an actor. I found a material editor example here of collision:

&d=1404734708

I am trying to recreate it myself. I am using the 3rd person demo. Here is the blueprint which feeds the actor’s location to a material parameter collection:

Here is the material parameter collection itself:

Here is my material with the collision code:

Whenever I move the character over the grass, nothing happens. The grass doesn’t bend as it is supposed to. The only thing I have gotten to work is replacing the material parameter collection, the one with the player’s location, with the camera’s position. like shown here:

The grass then bends when I move my camera close. But I need the actor to move the grass not the camera. I guess my material parameter location isn’t working? Please help. Thank you so much, sorry if this is a bit nooby

bump. i’ve been pulling my hair for days trying to solve this.

In the tutorial he outputs the “spherepos” parameter to use it with a character. It need to have the sockets on his feet and collision components attached to them. Then the grass should have the material instance applied, not the material itself. So in character BP you can use your sphere colliders within that mat instance. But i didn’t it yet, so can’t show you an exsample. I will, but it not gonna be soon. Hope you’ll figure out you self