# How to use bindaxis on actor?

**URL:** <https://forums.unrealengine.com/t/how-to-use-bindaxis-on-actor/490437>\
**Category:** Community & Industry Discussion\
**Tags:** binding, unreal-engine, functions, question\
**Created:** [October 30, 2021, 11:15pm UTC](https://forums.unrealengine.com/t/how-to-use-bindaxis-on-actor/490437 "2021-10-30T23:15:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alolan\_pearl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alolan\_pearl](https://forums.unrealengine.com/u/alolan_pearl)\
**Post date:** [October 30, 2021, 11:15pm UTC](https://forums.unrealengine.com/t/how-to-use-bindaxis-on-actor/490437/1 "2021-10-30T23:15:00Z")

</div>

I am making an interactable actor and I am not sure what to do with my axis value when I call my function. H file:

void BindToActor(UInputComponent\* inputComponent);

```
void StartAnimation(float Val);

UFUNCTION()
void TimelineProgress(float Value);

FTimeline FCurveTimeline;
UPROPERTY(EditAnywhere,Category = "Movement")
UCurveFloat* CurveFloat;
UPROPERTY()
	FRotator StartLoc;
UPROPERTY()
	FRotator EndLoc;

UPROPERTY(EditAnywhere,Category = "Timeline")
	float ZOffset;

```

cpp:

void AInteractBase::BeginPlay()  
{

Super::BeginPlay();

```
StartAnimation(); ??

```

}

void AInteractBase::BindToActor(UInputComponent\* inputComponent)  
{

```
InputComponent->BindAxis("TurnRight", this, &AInteractBase::StartAnimation);

```

}

void AInteractBase::StartAnimation(float Val)  
{

```
FOnTimelineFloat TimelineProgress;

TimelineProgress.BindUFunction(this, FName("TimelineProgress"));

FCurveTimeline.AddInterpFloat(CurveFloat, TimelineProgress);
FCurveTimeline.SetLooping(true);
StartLoc = EndLoc = GetActorRotation();

FCurveTimeline.PlayFromStart();

EndLoc.Yaw += Val;

```

}

void AInteractBase::TimelineProgress(float Value)  
{

```
FRotator NewLocation = FMath::Lerp(StartLoc, EndLoc, Value);
SetActorRotation(NewLocation);

```

}

Well I need to call my start animation function in beginplay() for it to start, but what happens to axis value? notice

EndLoc.Yaw += Val; in my startanimation function, when I call it, it says I need to add function parameters when I already have an access value that is attached to my “TurnRight” BindAxis, what am I supposed to do ?
