# Modify Angular Rotation Offset at Runtime

**URL:** <https://forums.unrealengine.com/t/modify-angular-rotation-offset-at-runtime/304164>\
**Category:** World Creation\
**Tags:** physics-constraint, unreal-engine, Physics, question, Blueprint, CPP\
**Created:** [January 16, 2015, 5:23pm UTC](https://forums.unrealengine.com/t/modify-angular-rotation-offset-at-runtime/304164 "2015-01-16T17:23:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![anonymous\_user\_21f049f1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_21f049f1](https://forums.unrealengine.com/u/anonymous_user_21f049f1)\
**Post date:** [March 7, 2018, 12:32pm UTC](https://forums.unrealengine.com/t/modify-angular-rotation-offset-at-runtime/304164/7 "2018-03-07T12:32:40Z")

</div>

I would like to know this as well, as I am attempting the exact same thing and encountering the same problem.  
Edit: Ok the simplest (Blueprint) work around that I found and works for that is just to have a StartingAngle variable like LazyMammal described, and use that to rotate the door with AddRelativeLocation in BeginPlay, (so after the constraint has been initialized). Obviously it’s not the greatest solution, there is unfortunately no ‘preview’ in the editor of your angle unless you create a seperate HiddenInGame mesh for that as workaround for example.  
What works better for me, in C++, is doing combining cin and 's answers and modifying the AngularRotationOffset like this, in BeginPlay:

```
    PhysicsConstraintComponent->ConstraintInstance.AngularRotationOffset -= FRotator(0.0f, DoorMeshComponent->GetRelativeTransform().Rotator().Yaw, 0.0f);
    PhysicsConstraintComponent->InitComponentConstraint();

```

---

_[View the full topic](https://forums.unrealengine.com/t/modify-angular-rotation-offset-at-runtime/304164)._
