AlignOrientation Does Not Work

Reproduction Steps
Add an AlignOrientation with its attachment mode set to OneAttachment and update its CFrame or PrimaryAxis in a loop, you will see that nothing happens.

AlignOrientation using Attachment Mode OneAttachment does not update with .CFrame or .PrimaryAxis.

Expected Behavior
AlignOrientation should align its attachment0 to its .CFrame or .PrimaryAxis

Actual Behavior
The AlignOrientation appears to be facing default Vector3 value without updating the attachment0’s cframe/orientation

Workaround
Either use TwoAttachment which seems to still be working fine, or keep setting RigidityEnabled on and off to display the proper cframe but it creates a very janky solution

Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-04-13 17:04:00 (-04:00)
Date Last Experienced: 2022-04-13 00:04:00 (-04:00)

Edit:
Cross posting an older post from scripting support; also want to add this started to happen only today right after I restarted studio for an update.

26 Likes

Can confirm. AlignOrientation was last working for me at 5:00 am PT. Today it does not work. Here is an example.

robloxapp-20220413-1728245.wmv (2.5 MB)

Mode - OneAttachment
PrimaryAxisOnly - false
ReactionTorqueEnabled - true
RigitityEnabled - false
MaxAngularVelocity - inf
MaxTorque - 1000000
Responsiveness - 140 (Tested also with other numbers)

11 Likes

thank the lord I am not the only one experiencing this

i tried experimenting myself and if you mess around with the properties it suddenly rotates and then doesn’t after that

strange behavior…

5 Likes

It seems to be something with setting the CFrame not updating the physics of the AlignOrientation, hence why it’s seemingly only working the first time. A temporary workaround is to disable and re-enable the AlignOrientation every time after setting it’s CFrame, but hopefully this should get fixed soon.

2 Likes

Can confirm our game is broken due to this issue

2 Likes

Here is a place download with an example of the bug. The CFrame does not update unless another property is changed. My game relies heavily on Mover Constraints, I hope this can be fixed soon.

AlignOrientationBug.rbxl (36.6 KB)

1 Like

Yeah this is a big problem right now. I have a lot of simulated banking/tilting on vehicles that are just completely broken right now because of this.

4 Likes

I noticed this too when the hands for my VR module wouldn’t rotate, thought it was because of a change I made to my code but the same issue is there in older versions. Glad it’s been reported :smiley:

2 Likes

Yeah, I experienced this a lot seems that it no longer updating based on other physics updates and only seems to react to property changes.

This seems to have been mentioned briefly as a workaround in the original post

1 Like

However, align orientation with 2 attachments work
2 months ago, I tried to make a car with align orientation with 1 attachment, I thought I was doing wrong, I did not know it doesn’t work

1 Like

Same problem here. Basically I’ve been using AlignOrientation (OneAttachment) to keep a boat from shaking/bouncing too much, thus giving it stability while on water, by updating the PrimaryAxis to the Attachment WorldAxis each instant.

It was working few days ago, yesterday I decided to check it and for some weird reason it wasn’t working as it was supposed to. I’ve decided to revert the game to past versions to test it and what was working days ago doesn’t work now. From what I understand, while looking at the values, PrimaryAxis is updated but it doesn’t reflect the result that is obtained in-game.

I’m also experiencing this. I’m using the OneAttachment mode, and it simply just doesn’t update the in-game model

The system was working fine a few days ago, and I haven’t updated any code

1 Like

Another workaround for this is adding a BodyGyro in the AlignOrientation’s place and applying the same code to it (This works if you have OneAttachment mode). This is how I was able to fix the issue temporarily. (Body movers are deprecated, so this should only be a temporary solution until AlignOrientation is fixed)

Correct me if I’m wrong, but I believe this bug has been patched as of the latest release notes (522)

1 Like

I don’t know if this is entirely to do with the bug. I just saw the fix and decided to post it here :man_shrugging:

AlignOrientation still does not work for me. I believe this is the fix that broke it.

5 Likes

Ohhhhh. I see. My bad.

1 Like

Can confirm that yesterday I had issues with AlignOrientation with zero change on my end. Broke my AI which used it to turn towards specific directions. I’m also using OneAttachment and enabling it after setting the CFrame seemed to work as a temporary workaround.

1 Like

Like enable the constraint at run-time?

Yeah, because of how I use it I will toggle it on and off. It looks like the issue is fixed now but originally with the issue if you set the CFrame after you enabled AlignOrientation it wouldn’t update the CFrame. You had to set the CFrame before enabling it for it to register the new CFrame and rotate to the correct orientation.