# Attach object only if the object is inside a collision

**URL:** <https://forums.unrealengine.com/t/attach-object-only-if-the-object-is-inside-a-collision/2511365>\
**Category:** Blueprint\
**Tags:** inventory, unreal-engine, Collision, Blueprint, question\
**Created:** [May 15, 2025, 12:30pm UTC](https://forums.unrealengine.com/t/attach-object-only-if-the-object-is-inside-a-collision/2511365 "2025-05-15T12:30:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magnificuhnt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@magnificuhnt](https://forums.unrealengine.com/u/magnificuhnt)\
**Post date:** [May 15, 2025, 12:30pm UTC](https://forums.unrealengine.com/t/attach-object-only-if-the-object-is-inside-a-collision/2511365/1 "2025-05-15T12:30:20Z")

</div>

Hi there! I’m trying to figure out how to attach an object only when it’s inside another collision (in this case a backpack). Would love any help as I’m feeling clueless on this one.

---

<div class="post-metadata">

**Author:** ![Eliteteams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eliteteams](https://forums.unrealengine.com/u/Eliteteams)\
**Post date:** [May 15, 2025, 1:40pm UTC](https://forums.unrealengine.com/t/attach-object-only-if-the-object-is-inside-a-collision/2511365/2 "2025-05-15T13:40:19Z")

</div>

You could do a check when you attempt to attach by calling GetOverlappingActor.  
Or you could use a boolean when you begin the overlap with the backpack.

> **[Get Overlapping Actors | Unreal Engine 5.5 Documentation | Epic Developer...](https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/Collision/GetOverlappingActors)**
>
> Get Overlapping Actors

Would one of those work?

---

<div class="post-metadata">

**Author:** ![magnificuhnt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@magnificuhnt](https://forums.unrealengine.com/u/magnificuhnt)\
**Post date:** [May 16, 2025, 11:16am UTC](https://forums.unrealengine.com/t/attach-object-only-if-the-object-is-inside-a-collision/2511365/3 "2025-05-16T11:16:45Z")

</div>

I appreciate the help! To specify, I need the items collision to be fully inside the backpacks collision so avoid the item sticking out if that makes sense.
