- Home /
Create a piston for a manipulator arm
Hello everyone,
I'm struggling with creating a manipulator arm which would be run using actuators. In order to simulate them I've decided to use a “piston” game object with two configurable joints: 1st is set to rotate only (alongside the perpendicular axis to “the piston”) 2nd can rotate and move alongside the main “piton” axis (like a piston would) The movement is being done using rigidbodies and setting velocity along the movement axis. This all works …. well, but the problem is that when I move the object, the anchor point of the 2nd joint moves as well. This is unacceptable for the sole reason that when I move into a position such as the line between the “piston” and the anchor stops going through the original rotation point – I lose all repeatability.
So, I’ve decided that I would change the anchor position to stay in place. But for the love of me I can’t do it. Ideally, I would set the anchor point after movement to be the same as the connected anchor, but I don’t know how. I’ve tried calculating the displacement between frames, but I don’t know how to transfer these results into anchor position, because even if I translate them into local coordinates – these values make no sense for anchors! My displacements are like 0,1 of a unit but it looks like the anchor should move 10x as much. I’m really struggling with this. I’ve tried parenting, unparenting. Setting scale values for the “piston” to be all the same, because Unity has problems with transforms otherwise (it seems). Nothing. Any help would be appreciated.
Thank you in advance. Cheers, Rafał Typiak
Hard to really comprehend your set up. Can you include some screenshots of the rigidbodies involved and the configurable joints connecting them?
Your answer
Follow this Question
Related Questions
desc.isValid() fails! Adjusting Configurable joint through script. 0 Answers
How create Realy fixed joint 1 Answer
Is there a way to rotate the anchor of configurable joint? 0 Answers
How do I calculate current x-axis rotation of a configurable joint and set it as target position? 0 Answers
Can I attach multiple ConfigurableJoints to one RigidBody (closed loop of ConfigurableJoints) 0 Answers