I have 2 submarine models, one of them is the inside and the other is the outside. I’m using alignOrientation to match the rotation of the outside and inside model, but the alignOrientation constraint is causing the outside model to get random linear velocities on it’s Y axis.
AlignOrientation properties:
(Attachment1 is set by a script)
When I disable RigidityEnabled it fixes the issue, but doesn’t do it’s job anymore, which is making sure that the 2 models have the same orientation. What I mean by this is that the force is too weak to align the models, but if I increase the force then the same bug happens.
(there is not a single script that adds velocity to the submarine)
(the sub floats fine (doesn’t go up or down like in the video) if I remove the alignOrientation that I’m talking about)
I tested using VectorForce to remove gravity as opposed to having no gravity and no gravity results in no movement. But with VectorForce it seems to gain a downward velocity when I rotate the inside part. So same result as what you’re getting.
I know if you used something like the LinearVelocity constraint, it would make sure it’s velocity is what you want regardless of gravity.
The gravity is normal as the players should be able to walk in the sub like you would in irl. Luckily I was able to replicate the problem with all the same conditions.
I don’t understand the problem at this point.
So you Align the inside model orientation with respect to the outside model? And then what just use a LinearVelocity or even a different constraint to keep the inside model from moving. If players are moving around inside the inside model, then it’s going to move even without the inside part moving from rotation.
The inside model only needs to change the rotation, nothing else (should remain in the same position). The problem is that the alignOrientation I’m using to make sure the inside model has the same rotation as the outside model is causing the outside model to get weird forces that move it upwards and downwards.
Goal:
The inside model needs to have the same rotation as the outside model.
My Solution:
Use AlignOrientation to have the same rotation.
Problem:
The AlignOrientation is applying weird linear forces to the outside model.
Not sure if I understood correctly but wouldn’t this stop the outside model from moving as the model will constantly move to the anchored part and not move?
The issue is with the alignOrientation constraint that’s making sure the inside model has the same rotation as the outside model and not the way I’m moving the outside model.