I’m making a compass tool that uses a HingeConstraint to rotate the compass’ needle, and unfortunately whenever I equip the tool my character shakes/wobbles for a short duration. This only happens when the needle is connected to the compass using a HingeConstraint, as trying:
result in the character correctly equipping the compass without shaking
This is a screenshot showcasing the current configuration of the HingeConstraint:
Increasing and decreasing the AngularResponsiveness
Increasing and decreasing the AngularSpeed
Setting the ServoMaxTorque to large values like 100,000 & 10,000 and small values like 1000 & 10 instead of infinity
but unfortunately the issue still persisted, which is why I suspect that it could be a bug and thus made this report
Here is a video I recorded showcasing the problem I’m experiencing in its first half (The second half showcases a separate issue I previously had with the compass, but now that issue is thankfully solved with the help I received here in the DevForum):
I will also provide a place file with my compass tool here:
Unfortunately, I think this is related to the physics engine and you cannot really do anything about it, the force of the servo is almost flinging your avatar around and we cannot really control the physics engine that much in Roblox.
It’s best to use a SurfaceGui, setting the CFrame of the needle around a axis or something else that does not rely on physics.
I’ve even tried moving everything to the client but the physics engine jank will still occur:
This is just the side-effects of having moving physics object inside of your tools or anything that becomes welded to the character.
The character teleportation issue isn’t present as well, even when aggressively rotating the needle or changing its position
The only problem I have left is trouble with finding the correct method and angle to rotate the needle, but this is due to my lack of experience with Motor6D so I’ll make a topic to ask for help if I don’t find the solution after I experiment some more
I’ll mark you as a solution since as I mentioned I do suspect you are correct, but I do hope that this ticket stays open since it would be nice if in the future it was possible to freely and creatively utilize physics constraints within tools
I played around with this a bit and it looks like the main issue is that the HingeConstraint applies a reaction force to the Humanoid. Normally, this is exactly what you would want a hinge to do but for this application, it applies an extra impulse to the humanoid which causes the shaking. I was hoping the new character controller might give more intuitive behavior for this application since it is physics-based but it gave pretty similar results.
Using a Motor6D is a good way to go as it will remove the physics solver from the equation and give you prescribed motion. If you want to make the compass with constraints, you can create a “Hinge” that doesn’t apply a force to the humanoid by combining an AlignPosition constraint with an AlignOrientation. These two constraints have the ability to turn off reactions so that they only operate on one of the bodies they are attached to (the needle in this case). The main draw back of this approach is that the AlignOrientation does not have a “servo” option so you would need to manipulate the target orientation directly.