thewebflea opened this issue on Jun 11, 2011 · 10 posts
lesbentley posted Sat, 11 June 2011 at 11:51 AM
Quote - for example make two cubes turn the same way or 1 clockwise and the other counterclockwise ?
I'll assume that you have looked at at least one of the links from my last post, and have gathered some of the basics of how ERC works.
Attached above is the text of an example pp2 (prop) file that contains two cube props, it should work in P6 and above. You should be able to use it in Poser, if you loose the ".TXT" part of the file extension, and save it under the 'Props' folder.
Load Example-01 in Poser, it will load two cubes into the scene, named "cube_1" and "cube_2". Select cube_1, and from its parameters palette set yRotate to 45°, you should see cube_2 follow suit and adopt a 45° rotation (you may need to move the cursor into the document window to cause a refresh, before you will see the effect). The rotation of cube_2 happens because of the slaving code in the 'yRotate' channel of cube_2.
Open Example-01.pp2 in a text editor and find the yRotate channel in cube_2. You will see this slaving code in the channel:
valueOpDeltaAdd
NO_FIG
cube_1
yRotate
deltaAddDelta 1.000000
Place a minus sign in front of the value in the 'deltaAddDelta' line, so that the slaving code now looks like this:
valueOpDeltaAdd
NO_FIG
cube_1
yRotate
deltaAddDelta -1.000000
Resave the file to disk, and load the Example-01 in a new scene. Now yRotating cube_1 should cause cube_2 to rotate in the opposite direction.
Now try xRotating cube_2, this should cause a morph to be expressed in cube_1, making cube_1 twice as tall at 45° xRotation of cube_2. This happens due to the following slaving code in the Morph-01 channel of cube_1:
valueOpDeltaAdd
NO_FIG
cube_2
xRotate
deltaAddDelta 0.022222
If I had used a value of '0.011111' in the deltaAddDelta line, the morph would be fully fully expressed when the rotation reached 90°. Now try setting the dial of Morph-02 to a value of one, this should cause cube_2 to zRotate by 45°, and yTran by 0.1 PNU. Look in the zRotate and yTran channels of cube_2 to see the slaving code that causes this.
The above should give you enough info to get started. It relates to un-parented props in P6, and is expected to work the same in later versions. The examples may not work for un-parented props in earlier versions, but should work if one prop is parented to the other.