Rotate an 6DOF joint to a specific angle

Godot Version



I would like to be able to rotate a rigidbody connected through a 6DOF joint to a specific angle.

My idea is to be able to specify the angle, speed and torque and execute the movement.

The only way I found to do this was to change the angular_spring_z properties.
But I don’t think it’s the right way to do this.

Does the angular_motor work? Or is it still broken?

I feel like you will want to work with quaternions? Or maybe some PID feedback loops to manage the forces. You give it a target calculate the error (the difference from current position to target position) then apply your PID functions to calculate a force until error is minimized.

I would cast two rays, one at the target and one at the center of the arm. The joint being the origin. Use the cross product to calculate an “area of error” the goal is minimize the error by moving the two rays to the same direction with the PID formulas.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.