I think you misunderstood what I was getting at.
No, the limbs offset commands simply positions the limbs, but they don't directly effect
the pivot point where the limbs rotate from. DB primatives are always created with their
origins centered. To my knowledge, you can't alter an object's, or in this case, a limb's
center of rotation.
Here's what I'm talking about:
`Setup Program
sync on
sync rate 0
autocam off
hide mouse
cls
`Make Shoulder (ROOT)
make object sphere 1,10.0
`Build Arm Parts
make object cylinder 2,10.0
scale object 2,100.0,300.0,100.0
make mesh from object 1,2
make mesh from object 2,2
delete object 2
`Add Mesh References To Main Object
add limb 1,1,1
add limb 1,2,2
`Delete Mesh References
delete mesh 1
delete mesh 2
`Build Object Hierarchy
link limb 1,0,1
link limb 1,1,2
`Position Limbs
offset limb 1,1,0.0,-20.0,0.0
offset limb 1,2,0.0,-30.0,0.0
`Fix Object Pivot (For Viewing Purposes)
yrotate object 1,90.0
fix object pivot 1
`Initialize Scene
position object 1,0.0,0.0,0.0
position camera 0.0,0.0,-150.0
`MAIN (Rotate Object Forearm)
do
center text screen width()/2,0,"Using DB primatives, you can't rotate a limb anywhere accept on its own center."
rotate limb 1,2,wrapvalue(limb angle x(1,2)+0.05),0.0,0.0
sync
loop
Now, of course you can simulate a
"PIVOT" offset by doing a little trig., which
is demonstrated below:
`Limb Pivot Point Offset Simulation
` By D Ogre
`This Program Demostrates A Possible Way To Simulate
`A Pivot Point Other Than The Center Of The Limb.
`Setup Program
sync on
sync rate 0
autocam off
`Create Root Object
make object sphere 1,5.0
`Create Limb
make object box 2,2.0,5.0,2.0
LimbXsize#=object size x(2)
limbYsize#=object size y(2)
make mesh from object 1,2
delete object 2
`Build Complex Object
add limb 1,1,1
delete mesh 1
link limb 1,0,1
`Calculate Limb Offset Based On Root And Limb Size
limbXoffset#=(object size x(1)+limbYsize#)/2
limbYoffset#=(object size y(1)+limbYsize#)/2
`Setup Camera
position camera 0.0,0.0,-20.0
`MAIN
do
`Calculate Limb Angle And Offset Relative To Root Object
angle#=wrapvalue(angle#+1.0)
limbXpos#=sin(angle#)*limbXoffset#
limbypos#=cos(angle#)*limbYoffset#
`Update Limb
rotate limb 1,1,0.0,0.0,wrapvalue(angle#*-1.0)
offset limb 1,1,limbXpos#,limbYpos#,0.0
sync
loop
Unless I'm totally off in left field, I think many would find it useful
to be able to change an object/limb pivot point for rotation.