Recently AlignPosition was given a ‘per axis’ property, allowing users to control what axis AlignPosition controlled. I required this feature to only control the Y axis. However despite this, I am not getting the results I expect.
I am using AlignPosition to set the height of the gliders on my trains system. Because I am only controlling the Y axis, I expect, regardless of what the X and Z position is set to, for it to only control the gliders Y positioning. The AlignPosition ForceLimitMode is set to PerAxis, and the MaxAxesForce only has force on the Y axis, with X and Z being set to zero.
The two gliders are welded, through constraints, to this base part. If I have the AlignPosition set to the Glider’s X and Z position, and then update the Y position, I get the results I expect:
However, if the AlignPosition’s X and Z position values are not set to the Glider’s X and Z position values, regardless of the fact that the PerAxis property is stating to only control the Y position, I get some very strange behaviour:
I wouldn’t expect these results, I would instead expect the same behaviour regardless of what the X and Z position is set to because the PerAxis property is telling the AlignPosition to only update the Y position.
I have attached a ReproFile below. First, try and just change the Y position of one Glider, and it works as intended. Then set the X and Z of the AlignPosition to something different and it suddenly gives these strange result. Given the fact I only want to control the Y position, I don’t want to have to constantly update the AlignPosition’s X and Z to whatever the Gliders X & Z position is as they need to move freely along the tracks.
AlignPositionTest.rbxl (56.6 KB)