Hi everyone, I’m using Hinge Constraints to make shipping equipment for my sinking ship game. Essentially, if you’ve ever seen the iceberg scene on the movie Titanic, I made what the officer uses to set the ship to “Full Astern.”
I’m using a repeat loop to wait for the second needle to move whenever the main handle is in its TargetPosition with a variance of +/- 0.1.
repeat wait() print(constraints.CurrentAngle) until constraints.CurrentAngle >= constraints.TargetAngle -.1 and constraints.CurrentAngle <= constraints.TargetAngle + .1
For my sinking script, I weld the entire ship to a PrimaryPart, and then CFrame the PrimaryPart. In my weld script, I make sure the Constraints are not affected so they can move.
When the ship is not sinking, the repeat loop finishes perfectly fine with no issue. However, when I sink the ship, the CurrentAngle behaves strangely. Whenever I move the Handle, the angle is nowhere near the 25 degree increment it should be. Furthermore, the Properties Window of the Constraint tells me that the angle is correct, yet the output outputs something entirely different. Once again, this issue does not occur if my sinking script is disabled.
Image: (The output is constraint.CurrentAngle)
Any help would be greatly appcreciated!