Skip to content

Delegate assigned to the wrong trigger component #1

Open

Description

@Nahor

Trigger1->OnComponentBeginOverlap.AddDynamic(this, &AFixedCameraTrigger::OnTriggerBeginOverlap2);

The delegate is created for Trigger1 when it should be Trigger2 (delegate for Trigger1 being created one line above, L57)

Activity

  1. gerlogu commented on Mar 20, 2023

    @gerlogu
    Owner

    Hi!

    First of all, thank you for your remark 😊

    On the other hand, well, it is correctly assigned. I changed the names before releasing it because in editor was confusing to use Trigger 2 like the first one. The assigned name in the meta data is the "correct one".

  2. Nahor commented on Mar 20, 2023

    @Nahor
    Author

    I suspect your comment about the "metadata" and "renaming" is related to the name of the cameras (the variable is named CameraX, while the DisplayName is "Camera Y"). If so, this is not what I'm talking about.

    L57 and L58 both assign a BeginOverlap event listener to the component Trigger1. I would think one should be for Trigger1 and the other for Trigger2.

    	Trigger1->OnComponentBeginOverlap.AddDynamic(this, &AFixedCameraTrigger::OnTriggerBeginOverlap1);
    	Trigger1->OnComponentBeginOverlap.AddDynamic(this, &AFixedCameraTrigger::OnTriggerBeginOverlap2);

    For that matter, the EndOverlap listeners are correctly set:

    	Trigger1->OnComponentEndOverlap.AddDynamic(this, &AFixedCameraTrigger::OnTriggerEndOverlap1);
    	Trigger2->OnComponentEndOverlap.AddDynamic(this, &AFixedCameraTrigger::OnTriggerEndOverlap2);
  3. gerlogu commented on Mar 20, 2023

    @gerlogu
    Owner

    Sorry, I misunderstood the issue. Thank you very much for notifying me about this! I have already released the fix 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions