title: Add OnClicked listener to AActor in UE 4.18
body: <p>I am trying to add an event listener to an actor so that I can preform certain tasks when the actor is clicked on in the game. I have tried multiple things including OnClicked.Add, OnClicked.AddDynamic and multiple versions of each that I saw in other answers but they all end up not compiling and giving a similar error.</p>
  
  <p>Here is my current class</p>
  
  <pre><code>// Fill out your copyright notice in the Description page of Project 
  Settings.
  
  #include "InterestItem1.h"
  
  
  // Sets default values
  AInterestItem1::AInterestItem1()
  {
      // Set this actor to call Tick() every frame.  You can turn this off to 
      improve performance if you don't need it.
      PrimaryActorTick.bCanEverTick = true;
  
  }
  
  // Called when the game starts or when spawned
  void AInterestItem1::BeginPlay()
      {
      Super::BeginPlay();
      OnClicked.AddDynamic(this, AInterestItem1::moveToItem);
  
  }
  
  // Called every frame
  void AInterestItem1::Tick(float DeltaTime)
  {
      Super::Tick(DeltaTime);
  
  }
  
  void AInterestItem1::moveToItem(UPrimitiveComponent* ClickedComp, FKey 
  ButtonPressed){
      UE_LOG(LogTemp, Log, TEXT("meh, they clicked me"));
  }
  </code></pre>
  
  <p>with this I am getting the following error in VS
  no instance of function template "FActorOnClickedSignature::_Internal_AddDynamic" matches the argument list</p>
  
  <p>and this compile error in the output log</p>
  
  <pre><code>CompilerResultsLog: Error: C:\Users\AtLink\Documents\Unreal Projects\Axis_Test_Purged\Source\Axis_Test_Purged\InterestItem1.cpp(18) : error C3867: 'AInterestItem1::moveToItem': non-standard syntax; use '&amp;' to create a pointer to member
  CompilerResultsLog: Error: C:\Users\AtLink\Documents\Unreal Projects\Axis_Test_Purged\Source\Axis_Test_Purged\InterestItem1.cpp(18) : error C2672: 'TBaseDynamicMulticastDelegate&lt;FWeakObjectPtr,void,AActor *,FKey&gt;::__Internal_AddDynamic': no matching overloaded function found
  CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: C:\Users\AtLink\Documents\Unreal Projects\Axis_Test_Purged\Binaries\Win64\UE4Editor-Axis_Test_Purged-4805.dll
  </code></pre>
  
  <p>I'm new to unreal so I could use some simple explanations of what I'm doing wrong. Thanks.</p>