sprite setPosition dilema May 05, 2010 07:59AM | Registered: 15 years ago Posts: 444 |
for(i=0;i<levelList[lvlnum].numPlanets;i++){ //For every planet that exists planets.SetImage(&planet1img); //Set the image planets.SetRefPixelPosition(0,0); planets.SetZoom((float)levelList[lvlnum].planetR/50); //Set the zoom planets.SetPosition(levelList[lvlnum].planetX-levelList[lvlnum].planetR,levelList[lvlnum].planetY-levelList[lvlnum].planetR); //Set the position manager.Append(&planets); //Add to the layer manager }planetX, and planetY are supposed to be the center of the circle, and planetR is the radius. The original radius is 50, and what the SetPosition line does is take the X value, which would place by the top left, and subtracting the radius from both the X and the Y values, which in theory would place it in the correct location.
Re: sprite setPosition dilema May 05, 2010 02:31PM | Registered: 14 years ago Posts: 552 |
Re: sprite setPosition dilema May 08, 2010 09:10PM | Registered: 15 years ago Posts: 444 |
Re: sprite setPosition dilema(SOLVED) May 10, 2010 05:14AM | Registered: 15 years ago Posts: 444 |