expressions question 2004-05-25 - By Peter Twardo
Back Well, since the amount of rotation, depends on both : translation, and radius of an object, your expression could't work.
I hope this helps:
(Try changing radius of your cylinder or whatever if you havent frozen it)
' ******************************************
CreatePrim "Cylinder", "MeshSurface"
Rotate , 90, 0, 0, siAbsolute, siParent, siObj, siX
ResetTransform "cylinder", siCtr, siRot, siXYZ
InspectObj "cylinder.kine.local"
AddExpr "cylinder.kine.local.rotz"
SetExpr "cylinder.kine.local.rotz", "cylinder.kine.local.posx*-(360/(2*PI *cylinder.polymsh.geom.cylinder.radius))"
' ******************************
Peter
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT size=2> <P><FONT face=Arial>Well, since the amount of rotation, depends on both : translation, and radius of an object, your expression could't work.</FONT></P> <P><FONT face=Arial>I hope this helps:</FONT></P> <P><FONT face=Arial>(Try changing radius of your cylinder or whatever if you havent frozen it)</FONT></P> <P><FONT face=Arial></FONT> </P> <P><FONT face=Arial>' ******************************************</FONT></P> <P>CreatePrim "Cylinder", "MeshSurface"</P> <P>Rotate , 90, 0, 0, siAbsolute, siParent, siObj, siX</P> <P>ResetTransform "cylinder", siCtr, siRot, siXYZ</P> <P>InspectObj "cylinder.kine.local"</P> <P>AddExpr "cylinder.kine.local.rotz"</P> <P>SetExpr "cylinder.kine.local.rotz", "<STRONG>cylinder.kine.local.posx*-(360/(2*PI*cylinder.polymsh.geom.cylinder .radius))</STRONG>"</P> <P>' ******************************</P> <P><FONT face=Arial></FONT> </P> <P><FONT face=Arial>Peter</FONT></P></FONT></DIV></BODY></HTML>
|
|