# Sticky object

**URL:** <https://forums.unrealengine.com/t/sticky-object/2237055>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [December 22, 2024, 3:11pm UTC](https://forums.unrealengine.com/t/sticky-object/2237055 "2024-12-22T15:11:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trem2trem](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@trem2trem](https://forums.unrealengine.com/u/trem2trem)\
**Post date:** [December 22, 2024, 3:11pm UTC](https://forums.unrealengine.com/t/sticky-object/2237055/1 "2024-12-22T15:11:27Z")

</div>

Hello

I got game which i’m woking on. there is ball. the ball bounce at the walls also another onject. i want it bounce at walls but stick to the objects. how can i do that.  
thanks

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [December 22, 2024, 3:34pm UTC](https://forums.unrealengine.com/t/sticky-object/2237055/2 "2024-12-22T15:34:42Z")

</div>

First, make sure that the `Simulation Generates Hit Events` setting is enabled for the **both** actors _(the ball and your other objects in this case)_. Once that’s set up, right click on the Event Graph of your ball BP, type in “Event Hit” on the menu that pops up and place the node by hitting enter. Then get an `Attach Actor to Actor` node, connect the `Other` pin of `Event Hit` into the `Parent Actor` pin of the node, connect `Self` _(which you can drag out of the Target pin)_ into the `Target` pin, and finally change the `Keep Relative` selections on the node to `Keep World`.

Hope this helps! 😇

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [December 22, 2024, 9:06pm UTC](https://forums.unrealengine.com/t/sticky-object/2237055/3 "2024-12-22T21:06:41Z")

</div>

Hey there @trem2trem! Welcome to the community! VA went over basically most of the relevant portions, but to add one thing I’d recommend either setting up collisions so that the balls will stick to only specifically tagged objects kind of like this post (but in your case a bit reversed). Alternatively you can filter by collision as well.

> [@Katamari Damaci Style Game](https://forums.unrealengine.com/t/katamari-damaci-style-game/49774):
>
> I was able to create a blueprint class that sticks to my ball, and to each other. This results in the squares sticking to each other and making long offshoots from the central object. I don’t even know where to begin getting the sticky objects to fill in the gaps to maintain a spherical shape as in Katamari Damacy. Any ideas? [katBall.PNG]
