Pages

quarta-feira, 7 de junho de 2017

BP Compendium 3: Add Child Actor Component

Add Child Actor Component


Adds an Actor as a component of another Actor. Thus the component actor follows the transformations of the parent Actor. When the parent Actor is destroyed, the Actor component will also be destroyed. The new actor's class must be specified in the "Details" tab of the "Add Child Actor Component" function.

Input
  • Target:  Reference to the Actor who will own the new component.
  • Manual Attachment: Boolean value. If false, the new Actor will be automatically attached. 
  • Relative Transform: Transformation used by the new component.

Output
  • Return Value: Reference to the created Actor.

Example Usage: 

In this example we have a blueprint that represents a weapon. The name of this blueprint is "WeaponBlueprint". In another blueprint that represents a character of the game there is an event that will be called during the game to add a weapon of type "WeaponBlueprint" to the character.

Click to enlarge

The image below shows the "Details" tab of the "Add Child Actor Component" function that is displayed when the function is selected. The class that will be used by the new actor must be informed in the "Child Actor Class" property.



Table of Contents