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.
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.
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.
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
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
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.
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)
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.
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.