How to cast in C++?

And:

You need to do it on component. I guess you want to assign material on item? make a UMaterial* property in Item in blueprints set the material and then on pick up use it with SetMaterial()

Ok so im building a pick up which will change my characters material once i pick it up the part where the character changes materials will happen in the character sides of things what i dont know is 1. how to cast to the pick up class and 2. how does the get mesh()-> set material() part work…