# Custom movement component is always null

**URL:** <https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895>\
**Category:** C++\
**Tags:** unreal-engine, bug-report, CPP, question\
**Created:** [July 10, 2014, 11:22pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895 "2014-07-10T23:22:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeekyPayback](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GeekyPayback](https://forums.unrealengine.com/u/GeekyPayback)\
**Post date:** [July 10, 2014, 11:22pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/1 "2014-07-10T23:22:32Z")

</div>

Branch: Binary  
Build: 4.2

Detailed information:

When adding a custom movement component, the component is always null after being returned from SpawnActor. The component itself is loaded and initialised, but the reference is lost when passing back up the constructor call stack.

More detail + debugging here - [Adding custom movement component - C++ - Unreal Engine Forums](https://forums.unrealengine.com/showthread.php?16514-Adding-custom-movement-component)

Steps to reproduce:

Create an empty project from the c++ shooter  
Create a new c++ file that subclasses CharacterMovementComponent

Change the Character.cpp file to use the new movement component (example here - [A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums](https://wiki.unrealengine.com/Custom_Character_Movement_Component))

Build + Run the game, start playing and then try and move. You cant because the component has been NULLed

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [October 3, 2014, 2:36pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/2 "2014-10-03T14:36:58Z")

</div>

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you

---

<div class="post-metadata">

**Author:** ![BigaCubensis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigaCubensis](https://forums.unrealengine.com/u/BigaCubensis)\
**Post date:** [March 22, 2019, 12:33pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/3 "2019-03-22T12:33:26Z")

</div>

Its still happening in 4.20.  
I successfully added C++ custom class, shown in editor, spawned correctly ingame, but blueprints try use GetMovementComponent() node get None as return.

---

<div class="post-metadata">

**Author:** ![Naters4lad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Naters4lad](https://forums.unrealengine.com/u/Naters4lad)\
**Post date:** [June 8, 2019, 8:40pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/4 "2019-06-08T20:40:50Z")

</div>

This is also happening for me in 4.22.2 and I set it up just like 's tutorial:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![GeekyPayback](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GeekyPayback](https://forums.unrealengine.com/u/GeekyPayback)\
**Post date:** [June 9, 2019, 2:28pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/5 "2019-06-09T14:28:52Z")

</div>

I think you’ll need to report this as a new bug. This one is marked as answered so they probably won’t look at it again

---

<div class="post-metadata">

**Author:** ![Babymaster3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babymaster3000](https://forums.unrealengine.com/u/Babymaster3000)\
**Post date:** [May 31, 2022, 2:33pm UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/6 "2022-05-31T14:33:16Z")

</div>

Parenting the BP to Actor and then re-parenting to Character subclass worked for me.

---

<div class="post-metadata">

**Author:** ![ChiggenWingz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChiggenWingz](https://forums.unrealengine.com/u/ChiggenWingz)\
**Post date:** [April 9, 2023, 6:20am UTC](https://forums.unrealengine.com/t/custom-movement-component-is-always-null/287895/7 "2023-04-09T06:20:31Z")

</div>

Ive been trying to fix an issue when trying to convert from UE 4.27 to UE 5.0 for a while now and got it to show me that my character movement kept returning NULL.

The technique of parenting my custom character base class to Actor then back to Character seemed to have fixed the issue of the CharacterMovement component being null (i think it broke other things) BUT finally after weeks of trying to figure this out, progress!
