Download

Get Mobility (Static/Moveable) of a static mesh?

Title says it all. Is it possible to get the mobility type of a static mesh or a specific actor? I need it to avoid applying a thrust force on static objects, therefore generating the following error:
“Mobility of (…) : StaticMeshComponent0 has to be ‘Movable’ if you’d like to AddForceAtLocation.”

Cant find any info about this on the documentation or forums.

So far i have tried branching the objects by their class, but as i cant classify them this is impossible.
Anyone know how i could get around this? Im stuck.

Yes, you can get it by accessing the “Mobility” parameter of the static mesh component. Then you can do a switch case to determine what type it is, and add different logic based on that.

Thank you so much man. All the best to you!