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"

Add a component to an actor copied from another component

I have 2 actors, a first actor and a second actor which is spawned from this first actor. The first actor will have a bunch of components added to it which drive the second actor, and as such these components often want to add components to the second actor in order to help them drive the actor (the second actor basically starts off as a blank slate, the components on the first actor will eventually build the second actor up into something more useful to them).

In some situations, it would be nice to be able to add a component to the second actor based on a component on the first actor. The example I have is that the first component may have a UShapeComponent on it for collision, and without knowing which shape component this is, it would be nice to be able to add the same shape component to the second actor so that the components on the first actor can listen for hit events on this second actor.

The question is, is there any way to add a copy of a component from one actor to another actor using a base class? Or am I required to create a specialized components to handle each type and copy the data over manually (in the example above, one for each of box, capsule and sphere)?

Product Version: UE 4.10
Tags:
more ▼

asked Jan 27 '16 at 04:00 PM in C++ Programming

avatar image

Chazney
26 3 6 8

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

0 answers: sort voted first
Be the first one to answer this question
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