Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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, Knikki

Product Version: UE 4.8
more ▼

asked Jul 15 '15 at 08:52 AM in Blueprint Scripting

avatar image

23 17 11 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Cast it to the AActor ? It is the "mother" of all actors. https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/index.html

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

Is that what you are looking for ?

more ▼

answered Jul 15 '15 at 12:47 PM

avatar image

311 22 17 39

avatar image KniknokOne Jul 15 '15 at 01:31 PM

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 ;) thanks d(°u° d)

avatar image RimmyD Jul 16 '15 at 12:09 AM

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

avatar image KniknokOne Jul 16 '15 at 02:29 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question