Download

How do I Get a Material from an Actor? / Getting "None" from Projectile/Actor

With Break Hit Result, Get Material and Get Base Material one can get the material off of a static mesh, well, usually:

http://i.imgur.com/jW5eIDG.png

But when my Projectile hits another projectile or my player model/collision box from the FPS template, it just returns “None” and displays an error in the Log:

https://youtube.com/watch?v=I67lc2hwl8g

I’ve tried activating Return Material on Move, as you can see; but that doesn’t seem to change anything.

Is this an Engine bug or expected behaviour? How Should i else get an Actor’s Material?

Hello,
I just did a try and you return none because the collision is done with the sphere around, not the mesh, and as the sphere hasn’t material, it returns none.

Thanks for the answer, but I’m not really getting what you are saying :frowning:

Where should the collission sphere be instead at? Inside the projectile mesh (eg SM_Projectile)?

Check the components in the component tab of the MyProjectile blueprint. You have the mesh (named sphere) and the sphere around (named collision component ^^). The mesh has no collision, the collision component has one. And the hit is done by the collision component.

CEsuQmv.png

Doesn’t work either :frowning: I’d really like to get this working…

If it’s the sphere you could also cast to that actor and get the mesh you want to change the material as long as it’s not a body part system where the specific part you hit should change the color.

I don’t even want to change stuff, I only want to get whatever material the mesh uses, and most of my meshes only have 1 anyway :frowning: