expressions question 2004-05-25 - By stefan@(protected)
Back well... I did a few test to try and get this "wheel" to be moving. And the expression that came out was:
Fc + ( cylinder.kine.global.posx * 360.0 ) / ( ( 2.0 * cylinder.cylinder.radius ) * PI ) * -1.0
But if the "wheel" stops (no translation X), it's still spinning. And it's not rotating correctly. I tried to add more decimals (ex. 360.0000) which it rounded down to what you see. So it's not moving correctly. But if I move it manualy in realtime it rotates correct.
So, anyone knows why? Or how would the expression be correctly written?
Best regards
stefan andersson p.s. the cylinder is rotated x=90 to get it standing up
alex dinnin <adinnin@(protected)> wrote:
> Thanks everyone for your help !!! > > Got it working a treat now !!! > > Alex > > Graham D Clark <mail@(protected)> wrote: > use getBBox to get the geometries min max values as diameter then use that > value as diameter in the line where you apply your expression, > or if you need the radius to animate over time (and the object has been frozen > or has no radius parmeter) then afaik you'll need to make a scop for it. > it gets a little trickier if you want to 'steer' your wheel too and have it > roate correclty in any direction but animating the wheels on paths and using > path percentage value to rotate can make that math a lot easier > -- ---- ---- ---- ---- ---- -- > http://www.grahamdclark.com > 2nd hand TD > > -- --Original Message-- -- > From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of > alex dinnin > Sent: May 25, 2004 12:40 PM > To: XSI@(protected) > Subject: Re: expressions question > > > Am I correct in saying then, that if you have frozen the object !!! you can not > use the radius ??? > > thanks for the help on this everyone.... > > Peter Twardo <peliosis_v2@(protected)> wrote: > > 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 > > > > -- ---- ---- ---- ---- ---- ----- > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger > > -- ---- ---- ---- ---- ---- ----- > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|