I want to move the shorter upper and longer lower-arms up and down, leftside of the arms anchored to the wall like in the drawing, the triangle must move accordingly with the pivot points. I'm not able to get both arms and the triangle stay together, please help, thank you.
You can try using Rigidbody Physics simulation, use hinge as Connect method between each pair of components:
Or simply use Inverse Kinematics (IK) bone constraints:
To do it by using Rigidbody simulation:
in Physics tab, set all static parts as Passive, and all moving parts as Active.
Select two parts, then click Connect and tweak a few options provided.
The hinge joints use the Z axis of the created empty object, so, if the axis is not expected, just rotate them manually.
Animated parts should have Animated toggled in Physic tab (located in Property Editor).
Steps per Second should be increased to improve the simulation quality (located in Scene tab).
Here is an example video to show how to make it. (I made some mistakes on purpose, to show where you should pay more attention.)
To do it by using IK bone constraints:
- Create an armature with 4 connected bones, make it a loop shape.
- Create an bone at the tip of the last bone (Bone 4 as shown in the screenshot below), as IK bone. (keep it disconnected to other bones)
- Add an IK Constraint to the last bone, then follow the settings in the image below.
- Now you can select either one of the three moving bones then rotate. That's it.
The way to do this is by creating two empties, one in the center of the right arm (the fixed arm) and another in between the two rigging points in the triangle, the first empty will be the controller, the upper and lower arms will inherit it's rotation using Copy Rotation Constraints.
Since the upper and lower arms are not in parallel to each other, this means that in reality, the triangle will rotate in the counter direction of the controller, in order to do this, you need to set a driver, here are the steps in detail:
Setting up Empties and Constraints
1- Make sure the upper and lower arms are parallel and horizontal (you will change this later).
2- Select the lower arm, go to Edit Mode by hitting Tab, select the face at the fixed arm side and hit Shift + S, then choose Cursor to Selected, this will position the 3D Cursor at the center of that face.
3- Press Tab to go back to Object Mode, then press Ctrl + Alt + Shift + C, choose Origing to 3D Cursor, this will set the origin of the lower arm at the end near the fixed arm.
4- Repeat steps 2 and 3 for the upper arm.
5- At this step, you should be now in Object mode, the upper arm is selected, it's origin is at the end near the fixed arm (to the right) and the 3D Cursor is at the upper arms origin, in case you accidentally moved the 3D Cursor, make sure you put it back at the origin of the upper arm (step 2), this is important for the next step.
6- Press Tab to go to Edit Mode, select all by pressing A once or twice, choose the 3D Cursor to be your pivot point (check the image below), and rotate on the global X axis by pressing R then X, move your mouse to rotate until it's in the right initial position, then confirm by left clicking your mouse, then go back to Object Mode. Make sure to set the pivot point back to Median .
7- Create an Empty, position it at the center of the fixed arm, this will be the controller, it will be good if you rename it to something meaningful like "Controller_empty" or whatever you find appropriate.
8- Select the upper arm, go to the Constraint menu in the Properties Panel, or press Ctrl + Shift + C, add Copy Rotation constraint. In the Constraint menu, choose the Controller Empty to be the target, repeat the same step for the lower arm. This will make the upper and lower arms rotate with the Controller on their origins.
9- Create another Empty, position it to be centered in between the two rig points of the triangle. Make sure it is selected, then Shift select the Controller Empty, press Ctrl + P, choose Object. This will create a Parent/Child relation with the Controller Empty as the parent.When you rotate the Controller, the second empty will rotate around it, if you try that and the rotation is weird, make sure again that the pivot point is set to Median, and not to 3D Cursor.
10- Select the triangle, create a Copy Location constraint, select the new empty to be the target, this will update the triangle's position to be where the new empty is, but it will not copy it's rotation, this is why you shouldn't use parenting for this.
Setting up a driver
11- Now all we need to do is to make the triangle rotate in the opposite direction of the Controller's rotation, for this you need to create a driver. Select the triangle, in 3D View, at your right hand, if you don't see the Properties Panel, press N to make it show, under Transform > Rotation, Right click the X axis value, and choose Add Single Driver, this will make the color of the value box turn purple (check the image below).
12- SAVE your file, I can't stress this enough, because the next step, Blender will have to reset your scene for security reasons. You need to open Graph Editor window, change the Editing Contest from F-Curve to Drivers. In Graph Editor window, on your left, you will see (X Euler Rotation) left click select it, then hovering your mouse over the Graph Editor window, press N to show the Properties panel.
13- In the Graph Editor's Properties panel, under Drivers, make sure that Type is set to Scripted Expression, Beside Expression, wright -var as the expression value, under Add Variable, make sure that var is the name of the variable, Transform Channel is selected, set the Ob/Bone to be the Controller Empty, set the Type to X Rotation, instead of the default X location, since we need the rotation of the Controller Empty, keep the Space to World Space, Save your file again before you proceed.
14- You will notice that you have an Error warning, if you look at the status bar at the top of Blender window, you will see Auto-run disabled, you have two options to choose from, Reload Trusted, or Ignore. This is not a bug, this is a procedure made by Blender to make sure that you know that the related script is trusted, in order to protect you from malware that can otherwise auto-run and harm your system if downloaded from an un-trusted site. This is why I emphasized twice that you should have your file saved before clicking Reload Trusted button, once you click it, this will reload your scene to the last save, if you didn't save, you'll have to start all over, so if you still haven't saved, do save now, then click the Reload Trusted button, confirm by clicking Revert.
15- This should be it, by creating a driver for the X rotation value of the triangle, setting the Controller Empty as the target object (Ob/Bone, I don't know why the weird label is like that, if you ask me, it should be just Target!) which Blender gives it a default name (var), and telling Blender, to use -var (minus var) for Expression value, what happens is that when you rotate the Controller Empty on it's global X (since you kept the space to World Space) this will assign it's negative value to the X rotation of the triangle, hence reverting it's rotation.