PDA

View Full Version : Code Generator



MrNiceGuy
10-29-2004, 08:17 AM
Would anyone possibly know how I would go about creating a code generator??? so that if I had an image and made it move by dragging it across a picture, the dode for that particular movement would be created?? Basically like making flash. Thanks for any help on the matter :confused:

zukko
10-29-2004, 08:45 AM
i think you should get the x,y,z values from where the image is at the start, then get the end values, then just use an:
if(actual_image_location<finishing_image_location)

zukko
10-29-2004, 08:49 AM
i think you should get the values from where the image is at the beginnig, then get the end values, then just use an:

if(current_xPos<ending_xPos)
{
current_xPos+=x_Movement_Rate;
glTranslatef(current_xPos,0,0);
}//repeat for y and z...

btw, dont mind the reply above...