New movement ability for character (Multiplayer)
I'm trying to add a new movement ability (teleporting) for my character, created by Third Person Sample Project. I'm following the Approach 4 from this Character Movement Component article. Using a C++ project, i've created my own child class from UCharacterMovementComponent. But i don't have any idea how to connect it with my Character class. Can you help me? P.S. I've found this question and my code is pretty much close.
asked Jan 09 '19 at 10:55 AM in C++ Programming
Oh, luckily, that's easy!
Have you seen this article on the UE4 wiki? Custom Character Movement Component
It call comes down to using the FObjectInitializer within your character class's constructor to tell your character to be initialized with your custom movement component. Specifically, the FObjectInitializer::SetDefaultSubobjectClass function will do the magic for you.
Take a look at that wiki page, and look up how the FObjectInitializer works if need be. And let me know if you want me to explain things a little further!
answered Jan 09 '19 at 06:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here