Download

UE4 Multiplayer Projectile no spawning correctly

I just started a first person project and tried making the projectiles spawn on server so all clients could see but when they are spawned on the server the spawn location is not correct

C++ Server Function
.h
I tried reliable and unreliable but both had the same problem


	UFUNCTION(Server, Unreliable, WithValidation)
	void CreateProjectile(FRotator SpawnRotation, FVector SpawnLocation);

.cpp


void AFirstPersonCharacter::CreateProjectile_Implementation(FRotator SpawnRotation,FVector SpawnLocation)
{
	UWorld* const World = GetWorld();
	if (World != NULL)
	{
		// spawn the projectile at the muzzle
		World->SpawnActor<ASurvivalProjectile>(ProjectileClass, SpawnLocation, SpawnRotation);
	}
}

When I spawn it on client its comes out of the end of the gun
Spawning on Client:

edeb70a4a1d05e2ae7ecdce6474dcf6ec2dd8460.jpeg

When I spawn it on server its way further then the end of the gun
Spawning on server with the function above:

09911a0a73dcb293dd2db15013e8f3738ef3c0ea.jpeg

Yo yo yo, do you have a validate function?

bool AFirstPersonCharacter::CreateProjectile_Validate(FRotator SpawnRotation,FVector SpawnLocation)
{
//check your variables and stuff if you want

return true;
}