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!

is it possible to get mobility of actors that are not static meshes? im getting an array of get overlapping actors and from there i want to be able to get the mobility of objects before trying to move them in order to avoid this error

There doesn’t seem to any option for anything other than Light or Static Mesh actors to get mobility.

1 Like