Cast to any Actor?

Hay everyone c(-__- _ )

So here’s my problem, I want to attach a physics actor to my player so it seems like he is carrying it but therefor I have to Cast to the actor class to disable physics simulation. Simply the problem is that I don’t want to cast to every single possible actor class that my character could possibly carry. So is there a way to do this without casting to every possible class?

Sincerely,

Cast it to the AActor ? It is the “mother” of all actors.

Remember that every custom class you create in UE4 extend another class.

Is that what you are looking for ?

Yeah I tried that but I cant get the static mesh from that class and disable physics simulation. However 2 people on the unreal forums pointed out that I could use either a blueprint that covers all carryable ojects or I could use an Interface. But i’m really glad you answered me :wink: thanks d(°u° d)

Cast to actor then do a GetAllComponentsOfClass for skeletal and static and set physics on any returned

This! This is what I searched for the whole time! You are the best. Thanks! d(^o^ d )