davedoo opened this issue on Apr 19, 2011 · 7 posts
lesbentley posted Tue, 19 April 2011 at 1:42 PM
The other way to do it is to use ERC. The Antonia Polygon figure uses ERC to implement grasp and spread. If you want to do it that way take a look at how it is done in Antonia. Basically doing grasp via ERC works like this:
Create a targetGeom channel in the hand named "Grasp", like this:
targetGeom Grasp
{
name Grasp
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.004
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
Next you need to determin which joint rotation will be involved in the fingers grasping. Let's say this is zrot. In the zrot channel of each finger (but not thumb) actor of the right hand place the following code below the "interpStyleLocked" line:
valueOpDeltaAdd
Figure 1
rHand:1
Grasp
deltaAddDelta 75.000000
Here is what a whole zrot channel will look like with the slaving code in place:
rotateZ zrot
{
name Grasp
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 1
keys
{
static 0
k 0 0
}
interpStyleLocked 0
valueOpDeltaAdd
Figure 1
rHand:1
Grasp
deltaAddDelta 75.000000
}
The procedure is the same for the left hand, except you use "lHand:1" in the slaving code. The 'thumbGrasp' and spread work in much the same way. Look in the Antonia figure, to see how it is done.