Hello, i am trying to make a simple custom node that gives me position of an actor. But it crashes instantly when i hit play. It builds and compiles without any problem.I am not really familiar with c++ and unreal engine so i cant be sure this crash is engine bug or my fault. Thanks for the help in advance. here is my .h file:
UCLASS()
class TEST3_API UC_BPNodeTest : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
UFUNCTION(BlueprintCallable, Category = "Test")
static FVector GetPos(AActor* actor);
};
inside .cpp file:
FVector UC_BPNodeTest::GetPos(AActor* actor) {
FVector v = actor->GetActorLocation();
return v;
}
in an actor: