Replacing SimpleMoveToLocation with Network Functionality (C++)

So, this is going to be a long post, and for that I apologize ahead of time :slight_smile:

I am using the top down template, and running into the known issue that SimpleMoveToLocation doesn’t work across the network.

I found this link that shows a solution in BPs but I am using the C++ template.

I ran into this wonderful gentleman that mostly has the code written in C++ link, it is a bit dated, but I was able to get it all up and running in 4.10.

Once all of that was done, I found that the proxy pawn class’ USpringArmComponent seems to ignore any settings I give it. I also removed the camera and spring arm components from the character class. I always end up looking through the player mesh’s chest when I spawn.

Here are what I think are the relevant lines of code, from the proxy.cpp file, any ideas what I might be doing wrong? I can post more code if needed, I just didn’t want to clutter things too badly :slight_smile:

Thanks in advance!

UCapsuleComponent* TouchCapsule = ObjectInitializer.CreateDefaultSubobject<UCapsuleComponent>(this, TEXT("dummy"));
TouchCapsule -> InitCapsuleSize(1.0f, 1.0f);
TouchCapsule -> SetCollisionEnabled(ECollisionEnabled::NoCollision);
TouchCapsule -> SetCollisionResponseToAllChannels(ECR_Ignore);
RootComponent = TouchCapsule;

// Create a camera boom...
CameraBoom = ObjectInitializer.CreateDefaultSubobject<USpringArmComponent>(this, TEXT("CameraBoom"));
CameraBoom -> AttachTo(RootComponent);
CameraBoom -> bAbsoluteRotation = true; // Don't want arm to rotate when character does
CameraBoom -> TargetArmLength = 1200.f;
CameraBoom -> RelativeRotation = FRotator(7.f, -50.f, -56.f);
CameraBoom -> bDoCollisionTest = false; // Don't want to pull camera in when it collides with level

											// Create a camera...
TopDownCameraComponent = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("TopDownCamera"));
TopDownCameraComponent -> AttachTo(CameraBoom, USpringArmComponent::SocketName);
//todo:the below might be bUseControllerRotation instead
TopDownCameraComponent -> bUsePawnControlRotation = false; // Camera does not rotate relative to arm

Never mind, user error :slight_smile: I had an unrelated error in another section of code that was causing it. Nothing to see here :slight_smile: