I’m developing a multiplayer topdown shooter and using a C++ ACharacter as base for my C++ character, which I then create a blueprint based on that for iterating with.
I was experiencing very weird jittering when I was playing as client and moving around.
I felt like it was some kind of replication / prediction issue and spent a few hours trying to understand what might be happening.
However after a while I got my C++ class into a weird state and the character movement component detail pane was showing no info. In order to fix the character movement component detail issue I found a post saying I could try reparenting to Actor then back to my base class.
This worked!
But weirdly, it also removed the jittering!!!
However - here’s the horrible part. ANY TIME I recompile the character C++, the jittering comes back until I reparent to Actor and back to my base class. Which means I lose any BP data I’ve added…
Has anyone any idea what might be going on?
NOTE:
I don’t think this is related but I had been following a tutorial which used a custom movement component and initialized it in the character constructor as such:
AActionGameCharacter::AActionGameCharacter(const FObjectInitializer& ObjectInitializer) :
Super(ObjectInitializer.SetDefaultSubobjectClass<UAG_CharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
However since I didn’t need to do anything in the custom movement component I decided to remove that.
My Class now doesn’t do anything with the movement component:
--- GC_Character.h ---
class MYGAME_API AGC_Character : public ACharacter, public IAbilitySystemInterface
{
...
}
--- GC_Character.cpp ---
AGC_Character::AGC_Character()
{
...
}
On removing and recompiling my BP class no longer showed the movement component correctly (the details were blank) and I needed to reparent to Actor then back to GC_Character to make it work again. That is how I actually discovered that this also seemed to fix the jittering…