Matching object rotation with rotational offset?

So I have 2 objects. A and B.

I’m trying to get object B to follow object A’s rotation, but with a starting rotational offset which is maintained no matter how the objects rotates there after.

So, if Object A starts at -45 degrees yaw, and Object B starts at 45 degrees yaw, as Object A’s yaw increases toward 0, Object Bs yaw would increase at the same rate. when A is at 0, B would be at 90.

Any help would be much appreciated. Seems like this should be simple, but its been driving me crazy all day. Thanks !

Just to be clear, these 2 objects are static meshes acting under physics. Each is within its own actor.

If you take actor 1 and get its current rotation. Take actor 2 and get its rotation. And set it to set its rotation at actor 1 rotation - actor 2 rotation. Something to that effect.

You want to make it out, but you’ll run into a problem if something interferes with the difference the equation will be using its current rotation which might change. So if your using a static offset the. You can use that static value as the difference against the current rotation of the actor you want it to follow.

Interpolate if you want it to be smooth.

Thanks. Yeah I’ve been able to determine the initial offset. However now when I’m updating B with A’s rotation plus the offset, B is rotating along a wierd axis. If A and B start in the same orientation it works, but otherwise pitching A will cause B to pitch in the wrong direction.

Just to be clear, The initial setting of the rotation of B niw works, in that its rotation starts correctly once set with A’s rotation plus the offset. Once it starts rotating after that first frame however, it starts doing so by the correct amount, but along the wrong axis.

If the rotation is at a different axes on both you may want to break the rotation, and only use the axis you want to rotate then make a rotation and use that axis say example a’s y and fill the x and z with b’ current rotation.

Also are these objects connected at all, same actor blueprints, child actors etc. keep in mind it’s rotation may be spinning at the root of its location.

For instance I had a volume I wanted to rotate from my character using the camera rotation… I had to use a sphere collision box in my character and make the volume a child of that. I could then use my player camera rotation to rotate the sphere which in turn kept the rectangle volume in place to pivot using the sphere. Hind sight I could probably use a dummie scene component to act as the pivot point.

Sorry for the slow response. Am now back trying to solve this.

The objects are 2 meshes in 2 separate blueprints. One is a motion controller mesh in the player BP, the other a physics simulating mesh within a simple “object” actor which is being “picked up”. I’m trying to maintain the rotational offset of the object when you pick it up using the motion controller, simple as that really!

I’m getting world rotation of the both. Trying to find the rotational difference, then combining the motion controller rotation with the delta every frame. That doesn’t appear to work, I just get spinning for some reason which i’m sure is obvious but that is lost on me, hehe.

Any further help much appreciated, thanks folks.

I’m stuck on the same issue years later, did you ever figure it out?