Originally posted by **** View Post
I tried to find this discussion in Discord, but I culd not find it, do you have some link? Thanks!
Does someone has any idea on how to solve this? I am creating things locally but I DO have a way of syncing things, based on an uint16 unique number. I don´t know exactly how to create a descendante of charactermovementcomponent. i could replace an actor but I don´t know to to descend and use a descendant of a component.
Do you mean replace the default character movement component from ACharacter with your own sub class ? I was looking at that the other day,
You can subclass the default UCharacterMovementComponent and do whatever you want with it then override it in the constructor where you are subclassing ACharacter so it uses yours. Something like below
.h
UCLASS() class YOUR_API AYourCharacterBase : public ACharacter
{
GENERATED_BODY()
public:
AYourCharacterBase(const class FObjectInitializer& ObjectInitializer);
.ccp #include "YourCharacterMovementComponent.h"
AYourCharacterBase::AYourCharacterBase(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UYourCharacterMovementComponent>(ACharacter::CharacterMovementComponentName)) { }
Is this about when switching maps that when you come into the next map you have no movement control? I have this issue and was starting to look into it, but found this. Is this the fix for that?
EDIT: NOPE not a fix for my issue.