Robot Arm

Avatar
protoborg
288 Posts
Posted Oct 03, 2014
I am making a robot arm. It looks something like this: 9616903-industrial-robotic-arm-isolated-on-white-background.jpg

I have all the parts parented correctly and it does move correctly in one direction. What I need it to do is move in the other direction and also for the claw (the fingers) to open and close properly. If you need the .vmf, I will send it to you. Please can anyone help me with this? I plan to release this thing as an instance when I have it working correctly.

Advertisement
Registered users don't see ads! Register now!
Avatar
opticalprocessor
88 Posts
Posted Oct 04, 2014
Replied 19 hours later
Hmm.

Really, instead of using brushes, use a model instead.

It'll be alot easier for mappers to implement than a brush / instance.

tl;dr, use propper.

Avatar
protoborg
288 Posts
Posted Oct 04, 2014
Replied 2 hours later
How exactly would a model be easier for mappers? The segments of the arm have to move in a hierarchy. I don't think that is possible with a propper model. if you can show me how to get the blasted thing to move correctly in propper, I will gladly make a model out of this thing.

Note: I am going to try making the various rotating parts out of func_rotating instead of func_door_rotating. Hopefully that will allow me to get full 180 degree movement.

Avatar
opticalprocessor
88 Posts
Posted Oct 05, 2014
Replied 18 hours later
Wait, you were using func_door_rotating?
Avatar
TeamSpen210
608 Posts
Posted Oct 05, 2014
Replied 14 minutes later
You do want to use func_movelinear & possibly momentary_rot_button (with flags set to disable the "button" bit). These have SetPosition inputs, letting you make them rotate/extend half/quarter/double / whatever you want basically with inputs. (Valve fortunately forgot to restrict the value to between 0-1 dispite what the FGD says, so you can enter negative SerPosition values or ones greater than 1).

Something I've liked doing for movelinears is instead of setting the "movement distance" to the maximum amount it can move, set it to something smaller like 32 units. Then SetPosition becomes "move the object in increments of 32 units", instead of the other way around. You can even set the movement distance to 1, making the SetPosition parameter become the the target distance it will move to. If you do this the OnFullyOpen/OnFullyClosed/OnReachedPosition outputs won't be triggered correctly/ at all, so be careful of that.

Avatar
protoborg
288 Posts
Posted Oct 05, 2014
Replied 3 hours later

opticalprocessor wrote:
Wait, you were using func_door_rotating?

Yes I was ("was" being the key word).

TeamSpen210 wrote:
You do want to use func_movelinear & possibly momentary_rot_button (with flags set to disable the "button" bit). These have SetPosition inputs, letting you make them rotate/extend half/quarter/double/whatever you want basically with inputs. (Valve fortunately forgot to restrict the value to between 0-1 dispite what the FGD says, so you can enter negative SetPosition values or ones greater than 1).

Nothing on this behemoth moves in a linear fashion. The only parts that actually do any moving are the joints and they rotate. The other parts are parented to the joints. Also, the parts that move can't be momentary_rot_buttons because this sucker is going to be well out of reach of the player. I found that by makign the time that the input last short enough and the speed at which the func_rotate moves short enough I can actually control how far the part of the arm moves. It is not exactly elegant, but it works. Now my challenge is getting the claw to not close on itself.

TeamSpen210 wrote:
Something I've liked doing for movelinears is instead of setting the "movement distance" to the maximum amount it can move, set it to something smaller like 32 units. Then SetPosition becomes "move the object in increments of 32 units", instead of the other way around. You can even set the movement distance to 1, making the SetPosition parameter become the the target distance it will move to. If you do this the OnFullyOpen/OnFullyClosed/OnReachedPosition outputs won't be triggered correctly/ at all, so be careful of that.

I might use movelinear for the base of the thing so that it will be able to move around on the surface it is mounted to. On the other hand trackTrain entities are pretty good for things like that.

Avatar
CamBen
973 Posts
Posted Oct 05, 2014
Replied 4 hours later
Personally the way I would do it is with a group of func_tanks. They allow for pretty easy aiming and rotating in pretty much any direction.
Avatar
TeamSpen210
608 Posts
Posted Oct 05, 2014
Replied 3 hours later
I meant to use the momentary_rot_button as the movement entity. Change the flags so players can't Use it to make it move, then send SetPosition inputs like on movelinears. It doesn't matter that it's a button, you can ignore that feature.
Avatar
protoborg
288 Posts
Posted Oct 06, 2014
Replied 17 hours later

TeamSpen210 wrote:
I meant to use the momentary_rot_button as the movement entity. Change the flags so players can't Use it to make it move, then send SetPosition inputs like on movelinears. It doesn't matter that it's a button, you can ignore that feature.

Actually, SetPosition does not work the way you think it does. It ONLY rotates to a particular position. It cannot be rotated again without another specific position, which requires that you have a second button. What this means is that the "button" will only rotate once with any particular button. This makes it more than useless for a robot arm, at least the kind of robot arm I am designing.

Advertisement
Registered users don't see ads! Register now!
Avatar
TeamSpen210
608 Posts
Posted Oct 06, 2014
Replied 4 hours later
Use a math_counter then, which would let you add/subtract numbers to send as SetPosition inputs. Add an OutValue output that triggers the SetPosition input, without any parameter. Then have two buttons, with Add or Subtract inputs with the amount as a parameter (you can use decimals).