Best Practice for custom character movement

Hi everyone,

I’ve recently switched to Unreal after about 8+ years of working in Unity, and as part of the learning process I’m building a pretty basic skiing game for my kids to play.

I wanted to get peoples opinions on what the best practice, or best approach is to building a character with a base movement style that is different from normal character movement.

Currently I’ve been extending and overriding the CharacterMovementComponent and using MovementMode::Custom, and have created a character that inherits from ACharacter to utilise all the tooling that Unreal already provides (I’d like to try and make it online so they can play with each other from their computers).

Is this a good approach to creating custom character movement, it feels a little bit overkill to have something that has the ability to fly, swim, and even walk when I will never be using any of that, although at the same time I’m not sure if there is a better approach to this without re-writing network prediction, ground detection, and all the other useful things that the base Character provides.

Further to this I’ll eventually be using Unreal for my work, so while I can get away with hacking stuff to make it work for a fun game for my kids, what approach would you guys take if you were writing this for a game you plan on releasing?

Thanks everyone so much for your help, this community seems to be really helpful so far, so I’m enjoying having made the switch!

Welcome to Unreal, I did the switch a few years ago as well and have not regretted anything.

It may feel like a bit overkill but as long as you have ~150 characters or less I don’t think you will notice a performance hit. The amount of benefits you get from the character movement component outweigh writing your own unless it’s an RTS (that’s a giant task anyways) in general. As for releasing a game with it, if it works, you can maintain it, and you don’t get negative feedback from testers then keep it as is. The C++ side of UE4 is a lot more forgiving than whatever flavor of C# Unity is pushing this year when it comes to performance.