PDA

View Full Version : rotate wheel of car model



Pepis77
07-05-2013, 02:58 PM
Hello, i have a car model and i like rotate one wheel. First i traslate the center to center wheel and after rotate from axis X but the wheel not rotate how i like.
Any idea?
I have translate respect to angle of rotation.

Carmine
07-05-2013, 03:17 PM
Hello, i have a car model and i like rotate one wheel. First i traslate the center to center wheel and after rotate from axis X but the wheel not rotate how i like. Any idea? I have translate respect to angle of rotation. If you are programming in C/C++, classic GL, and GLUT, post your code. I'm sure people can help if you do that much. If I can compile and run it. I'll try to help you.

Pepis77
07-07-2013, 10:56 PM
If you are programming in C/C++, classic GL, and GLUT, post your code. I'm sure people can help if you do that much. If I can compile and run it. I'll try to help you.

Hello, I used OpenTK and first calculate of center of my object and after translate the center and rotate:




center = CalculeCenterGroup("Cylinder01");

GL.Translate(-center.X, -center.Y, -center.Z);
GL.Rotate(bladeAngle, 0, 0, 1);
GL.Translate(center.X, center.Y, center.Z);

Thanks