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"

Capsule Component is Not Attached

HI

I Want Attache Capsule Component By Monster Left Hand

I will Make Monster Attack System By IMage alt text

  1. Monster Attack Event Call

  2. Attack Comp Loder GetComponent() According to Event Index

  3. Component Action

But I Make Capsule Component In AttackCompLoder But Capsule Component is Not Attached to want Point

alt text

Red Circle, I want point to attach CapsuleComponent

this is my code

 void AMonsterBase::BeginPlay( )
 {
 
     AttackCompLoader = GetWorld()->SpawnActor<AAttackComponentLoader>();
     AttackCompLoader->AddAttackComp( TEXT( "LHand" ), this,10.f, 10.f );
 
 }
 
 
 void AAttackComponentLoader::AddAttackComp( const FName& AttachSocketName, AMonsterBase* Parent, float InRadius, float InHalfHeight ) {
 
     UAttackComponent* AttackComp = NewObject<UAttackComponent>( UAttackComponent::StaticClass());
     AttackComp->RegisterComponent( );
     AttackComp->SetCapsuleRadius( InRadius );
     AttackComp->SetCapsuleHalfHeight( InHalfHeight );
     AttackComp->SetRelativeLocation( FVector( 0, 0, 0 ) );
 
     FTransform TempTransForm;
     Parent->AddComponent( FName( "AttackComp" ), false, TempTransForm, AttackComp );
 
     AttackComp->AttachTo( Parent->GetMesh(), TEXT("LHand") );
     AttackCompArray.Add( AttackComp );
 
 
 }

In Editer I Can See AAttackComponentLoader::AttackCompArray Data

But Component Is Not Attached that I want Socket(Position)

What should I do.

Product Version: UE 4.10
Tags:
구상도.png (114.0 kB)
손 콜리더.png (795.2 kB)
more ▼

asked Apr 02 '16 at 07:43 AM in C++ Programming

avatar image

baehun92
6 2 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