3DMastermind
03-25-2008, 06:04 PM
This sounds alot like the gun turret I posted once...
Here it is again.
In order to direction constrain the box (in one axis) to the black sphere,
the 'Green' sphere was introduced.
Run script and click play.
CreatePrim "Cube", "MeshSurface"
GetPrim "Sphere"
SetValue "sphere.sphere.radius", 1.909
Translate , 20.0800766438126, 0, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
Translate , 0, 10.1774115927083, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
Duplicate "sphere", , 2, 1, 1, 0, 0, 1, 0, 1, , , , , , , , , , , 0
Translate , 0, 0, 0, siAbsolute, siPivot, siObj, siY, , , , , , , , , , 0
CopyPaste "sphere.kine.local.posx", , "sphere1.kine.local.posx", 1
CopyPaste "sphere.kine.local.posz", , "sphere1.kine.local.posz", 1
SelectObj "cube", , True
ApplyCns "Direction", "cube", "sphere1"
ActivateVertexSelTool
AddToSelection "cube.pnt[1,3,5,LAST]", , True
ActivateVertexSelTool
Scale , 0.123595505617978, 0.123595505617978, 0.123595505617978, siRelative, siLocal, siObj, siXYZ, , , , , , , , 0
SelectObj "sphere", , True
ActivateObjectSelTool
Translate , -51.1970724300474, -1.77635683940025E-15, 27.2850482494317, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
Translate , 0, -51.5237959206949, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
SaveKey "sphere.kine.local.posx,sphere.kine.local.posy,sphe re.kine.local.posz", 1, , , , False
SetValue "PlayControl.Key", 100
SetValue "PlayControl.Current", 100
Translate , 68.3907688771745, 0, -48.3810451734775, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
Translate , 0, 81.5554445749718, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
SaveKey "sphere.kine.local.posx,sphere.kine.local.posy,sphe re.kine.local.posz", 100, , , , False
SetValue "PlayControl.Key", 52
SetValue "PlayControl.Current", 52
Translate , 15.844195722278, 0, 10.6398149136693, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
SaveKey "sphere.kine.local.posx,sphere.kine.local.posy,sphe re.kine.local.posz", 52, , , , False
SetValue "PlayControl.Key", 1
SetValue "PlayControl.Current", 1
MakeLocal "sphere1.display", siNodePropagation
SetValue "sphere1.display.wirecolorr", 0.125
SetValue "sphere1.display.wirecolorg", 0.878
SetValue "sphere1.display.wirecolorb", 0.125
DeselectAll
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.