# Camera not attaching to SpringArmComponent 

**URL:** <https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214>\
**Category:** C++\
**Tags:** unreal-engine, editor, question, CPP, Blueprint\
**Created:** [May 12, 2025, 9:37pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214 "2025-05-12T21:37:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![seaquill123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@seaquill123](https://forums.unrealengine.com/u/seaquill123)\
**Post date:** [May 12, 2025, 9:37pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/1 "2025-05-12T21:37:45Z")

</div>

![Editor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/2/3722e2289a9379d52c638fdb5cf073a9aa5e2d24.png)  
 ![Code](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/e/9ee7932adfbe63eb54803a3d411aca3eb7477121.png)

this is my code

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [May 12, 2025, 9:47pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/2 "2025-05-12T21:47:43Z")

</div>

In your BP it looks like the camera boom and camera are children of the mesh. You’d want the desired camera to be a child of the camera boom

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 9:59pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/3 "2025-05-12T21:59:03Z")

</div>

that tend to happen if you’ve created your bp and _then_ changed the attachment of the camera in cpp. so ue serializes the parenthood differently.

go to the bp, change the parent to an actor, then change it back to the cpp class.  
thanks for sharing the code. it was helpful.  
also share the header please, to ensure you have the appropriate uproperty tags (readonly and visibleanywhere)

---

<div class="post-metadata">

**Author:** ![seaquill123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@seaquill123](https://forums.unrealengine.com/u/seaquill123)\
**Post date:** [May 12, 2025, 11:09pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/4 "2025-05-12T23:09:55Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/4/4249c3c9d1a390602ede05ba753c02584a92cbce.png)  
Thats my header, I changed to ReadWrite to see if it would let me change the heirarchy of the Components and attachments in the BP.

how would I change the parent?

---

<div class="post-metadata">

**Author:** ![seaquill123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@seaquill123](https://forums.unrealengine.com/u/seaquill123)\
**Post date:** [May 12, 2025, 11:12pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/5 "2025-05-12T23:12:25Z")

</div>

Would this also mean i have to change the parent class every time i want to add/remove components from the cpp file?

---

<div class="post-metadata">

**Author:** ![seaquill123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@seaquill123](https://forums.unrealengine.com/u/seaquill123)\
**Post date:** [May 12, 2025, 11:24pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/6 "2025-05-12T23:24:33Z")

</div>

The ADS camera doesnt need to be attached to a camera boom as its a first person view, i need the ThirdPerson camera to attach to the camera boom but when i attach it, it doesnt seem to attach in the BP

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 11:32pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/7 "2025-05-12T23:32:47Z")

</div>

readwrite can be confusing.  
readonly is recommended, since it means that you can’t make the pointer point to another object. and yet you can still access and modify the object.

also i recommend to initialize to nullptr and maybe use TObjectPtr instead of Uxxx\* (though this “should” not affect you much).

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 11:34pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/8 "2025-05-12T23:34:47Z")

</div>

nopes. it only happened because you changed the parent of a component with another one.  
in my experience that change tends to get screwed.  
maybe there’s a way to fix it in cpp or bp but i don’t know of it.  
maybe by making the component reparent correctly on the bp constructor (make sure you call the parent constructor (right click on the function name node \> add call to parent)

to reparent use this [How to change parent class of blueprint asset? - #3 by IphStich](https://forums.unrealengine.com/t/how-to-change-parent-class-of-blueprint-asset/281843/3)  
[blueprint change parent at DuckDuckGo](https://duckduckgo.com/?q=blueprint+change+parent)

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [May 12, 2025, 11:36pm UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/9 "2025-05-12T23:36:13Z")

</div>

> [@seaquill123](#):
>
> i need the ThirdPerson camera to attach to the camera boom but when i attach it

yups. i understand. i still think is the issue we’ve discussed.

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [May 13, 2025, 8:12am UTC](https://forums.unrealengine.com/t/camera-not-attaching-to-springarmcomponent/2507214/10 "2025-05-13T08:12:01Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/optimized/4X/c/0/1/c01d0b43708447d65e3be7836ab1567910ad95c9_2_690x41.png)

Can you try without the AttachToComponent call ?  
SetupAttachment should be enough.
