# Set Constraint Reference Frame/Orientation/Position

**URL:** <https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793>\
**Category:** Editor Scripting\
**Tags:** frame, reference, physics-constraints, unreal-engine, question\
**Created:** [September 17, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793 "2016-09-17T16:35:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackFangTech](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlackFangTech](https://forums.unrealengine.com/u/BlackFangTech)\
**Post date:** [September 17, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793/1 "2016-09-17T16:35:21Z")

</div>

How do I use these functions? There have been several threads on the issue, but none with conclusive answers. What coordinate space should the inputs be in? World space? Constraint relative to component? Component relative to constraint?

Can somebody write out an example? Something like, “If you want the constraint to act like it was set with component A at X and component B at Y then you seed to input vectors W and Z.”

---

<div class="post-metadata">

**Author:** ![BlackFangTech](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlackFangTech](https://forums.unrealengine.com/u/BlackFangTech)\
**Post date:** [September 19, 2016, 7:25pm UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793/2 "2016-09-19T19:25:05Z")

</div>

I set up some simple blueprints to test this through trial and error, and I have an answer.

The reference frame is the desired position/orientation of the constraint relative to the component being constrained.  
Example: ComponentB is constrained to Component A and hanging 200 units bellow it. You want to move the constraint to directly between them while keeping them the same distance apart. Frame one should be set to 0,0,-100 and frame two should be set to 0,0,100.

---

<div class="post-metadata">

**Author:** ![grygabrielphon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grygabrielphon](https://forums.unrealengine.com/u/grygabrielphon)\
**Post date:** [August 8, 2017, 4:25am UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793/3 "2017-08-08T04:25:28Z")

</div>

This explanation helped! Thanks!

---

<div class="post-metadata">

**Author:** ![mrphilip246](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrphilip246](https://forums.unrealengine.com/u/mrphilip246)\
**Post date:** [March 27, 2021, 1:02pm UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793/4 "2021-03-27T13:02:09Z")

</div>

Greatly appreciated!

---

<div class="post-metadata">

**Author:** ![JohnADaniels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/johnadaniels/32/1080686_2.png) [@JohnADaniels](https://forums.unrealengine.com/u/JohnADaniels)\
**Post date:** [October 1, 2022, 2:31pm UTC](https://forums.unrealengine.com/t/set-constraint-reference-frame-orientation-position/370793/5 "2022-10-01T14:31:40Z")

</div>

Nice answer, I had no idea.
