Jump to content
Developer Wiki and Function Reference Links ×

hellllp!


AFDesign

Recommended Posts

Hi,

i can't solve this problem:

I have a loop that create many extrusions, and i want to rotate every single extrusion with the value "protx". The problem is that all my object is rotated (see attachment)

for n:=1 to pnumero+1 do begin

hprogressiva:=(n-1)*(hspazi+pspessore);

BeginXtrd(hprogressiva,hprogressiva+pspessore);

Rect(0,pProfondita,lunghezza,0);

EndXtrd;

Rotate3D(protx,0,0);

end;

Somebody could help me?

thanks, sorry for my english!

Andrea

Link to comment

Ciao Andrea,

???Your code rotates the most recently created object around the User Origin and not around the object's center. Try replacing your line:

Rotate3D(protx,0,0);

with:

Get3DCntr(LNewObj, Xcen, Ycen, Zcen);

Set3DRot(LNewObj, protx, 0, 0, Xcen, Ycen, Zcen);

If it works, it will get the center of each extrude as it is created and use that point for the rotation center. I haven't tested it, so it may not work. Write back if you need more help.

Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...