How can I use the motioncontroller to hide an actor?

Ok,My question is use the motioncontroller that maybe there is a box or other mesh on it to hide(or cutting) something(a static mesh or BP actor,etc.),and only that part of the hidden was wrapped by the motioncontroller ,when it left this part and will be desplayed. Just like one of the Demo of the Lab(i remember it’s a skeleton demo),and that is what I want.Some one told me using a specific material can realize it.
So,is there anyone know how to solve it? Nomatter using the BP and material or other.

(Sorry for my bad english) :slight_smile:

Yes. You have to define a cutting plane using a normal and a position vector. Then you must store those value in a vector parameter set that the materials can access.

Finally do some math and check if the world position of the fragment is on either the top or the bottom side of the plane. You can use the dot product and the cosine part of it for this.

If the cosine is smaller than 0, then simply mask it out in the material editor. You have to set it to translucent masked in thw material properies though.

Good luck.

http://puu.sh/qqzda/071d603097.png

http://puu.sh/qqzfP/8f9569ae64.png

Yes, you use a MaterialParameterSet.
You set the values using blueprints, then you use those in your calculations in the material.

It seems doesn’t work,maybe my connections is wrong?? and the BPplane only has a plane model is right? don’t need to do anyother?

That is because you set the color to be the result of my little snippet. What I showed you was how to controll the opacity or the mask. You have to put the result of my code into the opacity or mask pin.

The lines that goes past the screen you can ignore. In my case I am using it for a more advanced texture.

sorry about that,and thank you very much . I had use your method to solve it, but how can I control the cutting range? Such as I just want to cutting is the size of my plan.I see there is only the sphere SpereMask node and I can set its radius,but no square.

What do you mean?

Then I would change your methods. I would instead store two vectors that mark the bounds of the cutting box. Then, instead of checking if the fragment is above or below the plane, you have to check if the fragment is between the two corners the vectors describe.

This will be VERY expensive though.

Oh thanks,I would think about this method and try it.