BindAxis value returns zero on some clients!

Hey, im an novice programmer and i was making a character that jumps on the direction of the inputaxis of WASD (Sort of like the Scout from TeamFort2) and for some reason while i was testing the multiplayer, i found that only one player out of all other players can actually get something that isnt 0 from the ForwardAxis and RightAxis Variables. any help would be awsome. (Header file included)

TestCharacter.h (1.2 KB)

(Yes i checked if the names of the bindaxis is correct)

// the variables for the input axis (Global variables


float ForwardAxis;
float RightAxis;

// Player input component setup
void ATestCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);


	PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ATestCharacter::CustomJump);

	PlayerInputComponent->BindAxis("ForwardInput", this, &ATestCharacter::MoveForward_Implementation);
	PlayerInputComponent->BindAxis("RightInput", this, &ATestCharacter::MoveRight_Implementation);

	PlayerInputComponent->BindAxis("MouseX", this, &ATestCharacter::LookAround);
	PlayerInputComponent->BindAxis("MouseY", this, &ATestCharacter::LookUp);
}


// the directional movement, the ForwardAxis and RightAxis are set here
void ATestCharacter::MoveRight_Implementation(const float Value)
{

	const FVector RightVector = GetActorRightVector();

	AddMovementInput(RightVector, Value, false);

	RightAxis = Value;
}

void ATestCharacter::MoveForward_Implementation(const float Value)
{

	const FVector ForwardVector = GetActorForwardVector();

	AddMovementInput(ForwardVector, Value, false);

	ForwardAxis = Value;

}


// the actual jumping process
void ATestCharacter::CustomJump_Implementation()
{

	const FVector ForwardVector = GetActorForwardVector();
	const FVector RightVector = GetActorRightVector();

	const float X = ((ForwardVector.X * ForwardAxis) + (RightVector.X * RightAxis)) * GetCharacterMovement()->JumpZVelocity;
	const float Y = ((ForwardVector.Y * ForwardAxis) + (RightVector.Y * RightAxis)) * GetCharacterMovement()->JumpZVelocity;

	FVector const Velocity = FVector(X, Y, GetCharacterMovement()->JumpZVelocity);

	LaunchCharacter(Velocity, true, true);

}

It looks like it is because you are binding to the Implementation functions so the function call never gets sent to the server. You would need to bind to the actual function (MoveRight instead of MoveRight_Implementation) which I’m not even sure is possible on an RPC function (could be wrong, just not sure).

With that being said, the AddMovementInput(DirectionVector) function handles all replication so if you remove the Server and Relieable properties from the UFUNCTIONs I think it should all work. Would need to remove the _Implementation postfix too of course

didnt work, i still have the same issue. maybe a controller issue?

EDIT:- did the same code on blueprints this time and it works just fine on all clients

EDIT:- FIGURED IT OUT!, instead of directly getting the forward axis, i instead made two functions

Event 1:- called Event 2 and give it the FAxis and RAxis to function 2, along with char reference

Event 2:- took the FAxis and Raxis and the character params and luanched the character

SCRAP EVERYTHING ON THE PREVIOUS COMMENT

First bind event 1 with the bindAxis (Make sure you use UFUNCTION with no Parameters)

then i call event 2 (NOT EVENT 2_Implementation) from event 1 (Event 2 has Server and Reliable as their UFUNCTION Params) event 2 has 3 params (AActor* OtherActor, float BindAxisValue)