Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2025 Feb 08 9:27 am)
You need to describe what you're talking about with a little more detail. It's easy to just spin a ball with the Y Rotate dial. If you want the ball to "Orbit" something, You'll need to move the ball's "Point of Origin" out away from the body of the sphere using the joint editor and again, spin the Y rotate dial.
=================
rotateX xRotate
{
name xrot
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 1
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
====================
You'd add the ERC so the paragraph now looks like this:
======================
rotateX xRotate
{
name xrot
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 1
keys
{
static 0
k 0 0
}
interpStyleLocked 0
valueOpDeltaAdd
NO_FIG
Ball
xRot
deltaAddDelta 1.000000
}
=====================
The NO_FIG is important; the next line (ball) doesn't really matter but has to be there. And the attached file is a script that will give you the correct number to use in deltaAddDelta instead of the 1.000000 in the above text.
Select the prop, run the script. It will calculate the prop's diameter and tell you the number for deltaAddDelta. (I use this all the time when making car models, for the "drive forward" dial.) The script also works for a body part, as in a wheel.
Download the attached Diameterfinder.py.txt and take off the .txt extension before using.
My python page
My ShareCG freebies
Almost what ockham said. It's a bit ambiguous what you mean by "x position", but I take this to mean xTranslation.
You put the code in the channel that is to be controlled, and the code "points" to the channel that is to do the controlling. Let's take the Poser ball prop as an example. To have yrot react to xtran, you would use this code in the yrot channel:
rotateY <span style="color:#ff0000;">yrot
</span> {
name GetStringRes(1028,10)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 1
keys
{
static 0
k 0 0
}
<span style="color:#00ff00;"> interpStyleLocked 0
valueOpDeltaAdd
_NO_FIG_
ball_1
<span style="color:#ff0000;">xtran
</span> deltaAddDelta 360.000000
</span> }
This stuff is called ERC, and the code block which does it is called "slaving code". The deltaAddDelta line determines the strength of the slaving. In the above example "deltaAddDelta 360.000000" means that the prop will do one full rotation for every poser unit travelled. To increase the rate of spin, increase the deltaAddDelta value.
Quote - ...and rotates by the correct amount (rotation = distance_travelled/Radius)?
I don't know the formula to work this out, but I would like to. I think it would involve Pi. I hope it involves apple Pi, because that is my favourite kind, I never was much good at math, but I'm good at eating. :blink:
Quote - > Quote - ...and rotates by the correct amount (rotation = distance_travelled/Radius)?
I don't know the formula to work this out, but I would like to. I think it would involve Pi. I hope it involves apple Pi, because that is my favourite kind, I never was much good at math, but I'm good at eating. :blink:
Lol. Let's say if the ball rotates 360 degrees, then the distance travelled is the circumference of the ball.
circumference = 2piRadius
The 2pi is the rotation in radians. So 2pi radians=360 degrees.
So solving for the rotation, you get 2*pi = circumference / Radius
www.acrionx.com | My Freebies | My Store | My Youtube Channel
Quote - like the above? at x=0, zrot=0 . at x=pi*d, zrot=-360.
Yes, exactly. Here is a simple wheel and axle figure I made to try out the codes with. It worked! . . . Well, sort of. It only works correctly when moving toward the positive x and y directions. Once you unzip to your Runtime directory, the figure can be found in the Acrionx->WheelAxle folder.
I have this in the .cr2 file for the wheel's rotation: rotateZ zrot { name zrot initValue 0 hidden 0 forceLimits 0 min -360000 max 360000 trackingScale 1 keys { static 0 k 0 0 } interpStyleLocked 0 valueOpDeltaAdd Figure 1 Axle:1 xtran deltaAddDelta -360.000000 } rotateZ zrot { name zrot initValue 0 hidden 0 forceLimits 0 min -360000 max 360000 trackingScale 1 keys { static 0 k 0 0 } interpStyleLocked 0 valueOpDeltaAdd Figure 1 Axle:1 ztran deltaAddDelta 360.000000 }
www.acrionx.com | My Freebies | My Store | My Youtube Channel
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
How do I make it so that if I spin the dial for the x position, for example, the ball automatically rotates about the y axis and rotates by the correct amount (rotation = distance_travelled/Radius)? Does this involve writing a script or something? It would certainly help me animate things easier.
www.acrionx.com | My Freebies | My Store | My Youtube Channel