# C++ class attachment to blueprints has broken relative movement (4.7)

**URL:** <https://forums.unrealengine.com/t/c-class-attachment-to-blueprints-has-broken-relative-movement-4-7/308151>\
**Category:** Blueprint\
**Tags:** relative-location, UE4-7, unreal-engine, editor, CPP, question\
**Created:** [February 26, 2015, 2:04am UTC](https://forums.unrealengine.com/t/c-class-attachment-to-blueprints-has-broken-relative-movement-4-7/308151 "2015-02-26T02:04:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siretu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Siretu](https://forums.unrealengine.com/u/Siretu)\
**Post date:** [February 26, 2015, 2:04am UTC](https://forums.unrealengine.com/t/c-class-attachment-to-blueprints-has-broken-relative-movement-4-7/308151/1 "2015-02-26T02:04:27Z")

</div>

So the initial problem I had was that after upgrading to 4.7, one of my blueprints (based on a C++ class) would move faster than the other blueprint (also based on a C++ class) it was attached to.

Now, I couldn’t let this go, so I kept minimizing the scope and commenting away code to see where the issue was until I managed to get it down to where I could reproduce it in a new project.

Steps to reproduce:

- Create a new blank C++ project.

- Create a new empty blueprint based on actor and place it in the level.

- Add a new C++ class to the project with the “Add code to project” button. Base it on Actor and call it MyActor.

- Replace the default constructor contents with

- Put the following in the header file, below public: and above the default constructor:

The contents of the MyActor.cpp file should be: [http://hastebin.com/ufozabayis.cpp](http://hastebin.com/ufozabayis.cpp)

The contents of the MyActor.h file should be: [http://hastebin.com/hicitisoho.cpp](http://hastebin.com/hicitisoho.cpp) (maybe a different API if the project name is different)

---

<div class="post-metadata">

**Author:** ![Siretu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Siretu](https://forums.unrealengine.com/u/Siretu)\
**Post date:** [February 27, 2015, 10:13pm UTC](https://forums.unrealengine.com/t/c-class-attachment-to-blueprints-has-broken-relative-movement-4-7/308151/2 "2015-02-27T22:13:02Z")

</div>

It turns out this was fixed as part of the [4.7.1 hotfix](https://forums.unrealengine.com/showthread.php?59923-Unreal-Engine-4-7-Released!&p=231129&viewfull=1#post231129)

It seems to have been UE-10732 and I can confirm that the patch solves the problems I was having.
