AddLocalRotaton in C++ Function Library

Hello dear Community,
in my Project I have the Gimbal Lock Problem.
My whole Project uses BluePrints.
Because of that, I want to make a C++ Function Library which I can acess with my BluePrints.
In the Function Library should be a Function which do a Rotation with Quaternions.

But everytime I try to use the ‘AddLocalRotation’-Function I get an Error Message: error C3861 “AddLocalRotation” identifier not found! (translated from german)

HEADER:

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "Runtime/Engine/Classes/Components/SceneComponent.h"
#include "MyBlueprintFunctionLibraryTest.generated.h"

UCLASS()
class FLYINGTEMPLATE_API UMyBlueprintFunctionLibraryTest : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

		UFUNCTION(BlueprintCallable, meta = (DisplayName = "AddLocalRotationQuat", Keywords = "rotation"), Category = "Utilities|Transformation")

		void AddLocalRotationQuat(const FQuat& DeltaRotation);
};

MAIN:

#include "FlyingTEmplate.h"
#include "MyBlueprintFunctionLibraryTest.h"

void UMyBlueprintFunctionLibraryTest::AddLocalRotationQuat(const FQuat& DeltaRotation)
{
	AddLocalRotation(DeltaRotation);
}

AddLocalRotation doesn’t seemed to be defined anywhere. Where are you pulling that from?

I want to use the standard AddLocalRotation method that you can also use in the blueprints.
I basically try to implement this original from pastebin in my function library.

AddLocalRotation comes from the SceneComponent, You need to pass in the USceneComponent and call it that way.

Header:

#include "Components/SceneComponent.h"

//...         

UFUNCTION(BlueprintCallable, meta = (DisplayName = "AddLocalRotationQuat", Keywords = "rotation"), Category = "Utilities|Transformation")   
 void AddLocalRotationQuat(USceneComponent* SceneComponent, const FQuat& DeltaRotation);

Source:

 void UMyBlueprintFunctionLibraryTest::AddLocalRotationQuat(USceneComponent* SceneComponent, const FQuat& DeltaRotation)
 {
    if (SceneComponent) 
    {
        SceneComponent->AddLocalRotation(DeltaRotation);
    }
 }

Big thanks to ExtraLifeMatt! You helped me very much :slight_smile:
I’m new to unreal but I’m glad to see how amazing this community is!

PS: I also set my functions to static to avoid the target node connection.