Guest Mark Flamer Posted January 31, 2011 Share Posted January 31, 2011 Can someone try this code and tell me if it's behaving as expected. I've been having trouble with combinations of move then rotate in a much larger and complex script. Wondering if its me or a bug. Thanks. PROCEDURE Main; VAR hnd : HANDLE; BEGIN hnd := CreateCone(0, 0, 0, 0, 0, 1, .5); Move3DObj(hnd, 2, 0, 2); SetRot3D(hnd, 0, 45,0,0,0,0); END; RUN(Main); Quote Link to comment
MullinRJ Posted February 1, 2011 Share Posted February 1, 2011 Hi Mark, ???It's working as it always has, but there is a bug where SetRot3D moves some objects back to the origin (like your cone) and other objects back to the place they were created (like Extrudes) before applying the rotation. This is better seen with an Extrude that is created in one position then moved to another. If you perform SetRot3D on it, it will jump back to it's creation position then rotate. I thought I submitted a bug several years ago, but I may be mistaken. In either case nothing's changed. The good news is you can work around it. In your case, you can rotate first then move it to get the cone's base at (2, 0, 2). hnd := CreateCone(0, 0, 0, 0, 0, 1, .5); SetRot3D(hnd, 0, 45, 0, 0, 0, 0); Move3DObj(hnd, 2, 0, 2); Or you can use Set3DRot() which applies an incremental rotation: hnd := CreateCone(0, 0, 0, 0, 0, 1, .5); Move3DObj(H, 2, 0, 2); Set3DRot(H, 0, 45, 0, 2, 0, 2); Remember to specify the point of rotation in the Set3DRot() call if you move it or create it away from the origin. HTH, Raymond Quote Link to comment
Guest Mark Flamer Posted February 1, 2011 Share Posted February 1, 2011 Thank You! I thought I was going crazy. I will resubmit as a bug. Quote Link to comment
Recommended Posts
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.