xantor opened this issue on Feb 06, 2007 ยท 14 posts
lesbentley posted Wed, 07 February 2007 at 6:21 PM
Q: If I have a figure with two pistons for example, and they are each seperate groups, can ERC be used to animate them so that one piston raises as the other one lowers? If yes then how is it done? A: Yes! It's quite easy. There are a couple of ways you could do it. Let's say for example that the 'yTran' dial moves the pistons up and down, and that the actor number used in the figure is ":1". Place this valueParm channel in the figures 'BODY' actor:
valueParm Pistons
{
name Pistons
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.004
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
Let's say the first piston is named "piston_1:1". Find the 'translateY' channel in "piston_1:1". Next find the the line in that cahnnel that says "interpStyleLocked", under that line paste the following slaving code: valueOpDeltaAdd Figure 1 BODY:1 Pistons deltaAddDelta 1.000000
Now find the 'translateY' channel in in the second pistin "piston_2:1". Paste in this code: valueOpDeltaAdd Figure 1 BODY:1 Pistons deltaAddDelta 1.000000
The only diffrence is the "-" in the 'deltaAddDelta' line. Now turnind the "Pistons" dial in the Body actor should make the pistons move in opposite directions. To explain the slaving code: Figure 1 = the figure number BODY:1 = the actor where the master channel lives Pistons = the name of the master channel deltaAddDelta 1.000000 = the control ratio, you can change this number to make the slave channels responde more or less strongly to the dial of the master channel. I said there are a couple of ways to do it. Another way would be to directly slave the translateY channel in "piston_2:1" to the translateY channel in "piston_1:1", using a minus sign in the deltaAddDelta line: valueOpDeltaAdd Figure 1 piston_1:1 Pistons deltaAddDelta -1.000000
You would then move both pistons by moving "piston_1:1".