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"

Is there any way to have my subcomponents not affected by the collision settings of the parent?

I have the following setup:

alt text

Where the capsule component is a "Pawn" object type and the "EdgeCollider" is another object type with completely different collision profiles. Here the Capsule one:

alt text

And here the EdgeCollider one:

alt text

Thing is that my Capsule component trigger this overlap event while it shouldnt. In blueprints it doesnt:

 // Collider for ledges -> This is on the constructor
     LedgeCollider = CreateDefaultSubobject<USphereComponent>(TEXT("LedgeCollider"));
     LedgeCollider->RelativeLocation = FVector(45.f, 0.f, 33.f);
     LedgeCollider->CanCharacterStepUpOn = ECB_No;
     LedgeCollider->OnComponentBeginOverlap.AddDynamic(this, &ASprunchCharacter::OnOverlapBegin);
 //The method itself
 void ASprunchCharacter::OnOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
     ClimbMarker = Cast<ASprunchClimbMarker>(OtherActor);
     if (GetCharacterMovement()->MovementMode == MOVE_Falling && InputMode == EInputMode::E_Default && ClimbMarker) {
         InputMode = getHangingInputMode(OtherActor);
         // if in mid air: try climbing to hit marker
         // Changing movement mode, we use flying because of convenience

Product Version: UE 4.16
1.png (16.3 kB)
2.png (35.4 kB)
3.png (38.0 kB)
more ▼

asked Aug 10 '17 at 01:04 PM in C++ Programming

avatar image

326 2 6 13

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

1 answer: sort voted first

Apparently "OnOverlapBegin" is a function that the engine uses for something else. Renaming the delegate to something else solved my problem.

more ▼

answered Aug 10 '17 at 05:28 PM

avatar image

326 2 6 13

avatar image vorixo Aug 10 '17 at 06:04 PM

Apparently problem is half solved, now it doesnt work at all, the function is declared as a UFUNCTION(), but cannot figure out why could be causing this issue, in blueprints, as said before, it does work perfectly.

avatar image vorixo Aug 10 '17 at 06:47 PM

Moving the binding of the function from the constructor to begin play solved the issue completely.

(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