# Constrain or attach 1 child object to 2 parents?

**URL:** <https://forums.unrealengine.com/t/constrain-or-attach-1-child-object-to-2-parents/313104>\
**Category:** World Creation\
**Tags:** attach-to-actor, unreal-engine, constraint, objects, question, Blueprint\
**Created:** [March 30, 2015, 12:18am UTC](https://forums.unrealengine.com/t/constrain-or-attach-1-child-object-to-2-parents/313104 "2015-03-30T00:18:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmalaska](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmalaska](https://forums.unrealengine.com/u/jmalaska)\
**Post date:** [March 30, 2015, 12:18am UTC](https://forums.unrealengine.com/t/constrain-or-attach-1-child-object-to-2-parents/313104/1 "2015-03-30T00:18:49Z")

</div>

I have one object. I’d like to be able to constrain it to two other objects and animate the ‘weight’ of the attachment. Example, some times it’ll be split (0.5, 0.5) and sometimes not (0.1, 0.9). Is there a way to do this? I’d like the 2 parent objects to be animatable too.

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [March 30, 2015, 1:01am UTC](https://forums.unrealengine.com/t/constrain-or-attach-1-child-object-to-2-parents/313104/2 "2015-03-30T01:01:12Z")

</div>

make an object with 2 actor references called mom and dad, and set their values to the objects you want to follow.

onEventTick, use IsValid to check if they are both valid, use getActorLocation on each, lerp between those 2 vector locations with a float variable plugged into alpha on the vlerp, and use setActorLocation to move the object to the new position.

---

<div class="post-metadata">

**Author:** ![jmalaska](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmalaska](https://forums.unrealengine.com/u/jmalaska)\
**Post date:** [March 30, 2015, 4:46pm UTC](https://forums.unrealengine.com/t/constrain-or-attach-1-child-object-to-2-parents/313104/3 "2015-03-30T16:46:54Z")

</div>

That worked, thanks!
