x

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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Do StaticMeshComponent objects count as actors?

I have a volume that detects (from code) when an actor which has a specific component enters it. It looks something like things:

 void ACustomVolume::ActorEnteredVolume(class AActor* Other)
 {
     if ( Other )
     {
         UCustomComponent* customComponent;
 
         if ( Other->Components.FindItemByClass( &customComponent) )
         {
             UE_LOG( LogClass, Log, _T( "%s entered volume" ), *customComponent->GetReadableName() );
         }
     }
 }

This currently works really well. But only with certain objects.

So, this has led me to a question:

Does an object with a StaticMeshComponent trigger actor events? Because all the objects I've tried except objects with a StaticMeshComponent in the root have triggered this method properly from the custom volume. Including player, projectiles, etc. But not StaticMeshComponent objects.

What I'm wondering is if there's something I'm not understanding in this, or if there might even be a bug somewhere?

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:16 AM in C++ Programming

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1987 9113

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:16 AM +

"Because all the objects I've tried except objects with a StaticMeshComponent in the root have triggered this method properly from the custom volume. Including player, projectiles, etc. But not StaticMeshComponent objects."

Can you clarify this a bit?

What actors have you tried?

StaticMeshActors?

What other actors with staticmeshcomponents have you tried?

Rama

show all comments (comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

In short, no, components are not actors.

more ▼

answered Mar 11 '14 at 02:16 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1987 9113

(comments are locked)
10|2000 characters needed characters left
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