Try to understand!<br>
it can't be done with VB!<br>
VB is way too slow, and crappy.<br>
<br>
: look bros i was actually asking for help with VB. i'm not sure if i mentioned this but if i haven't then i'm sorry. and do you think you could tell me how to do that in VB and not VC or C whichever you told me in???<br>
: <br>
: : I think you can get rid of the holes by rotating from target to source instead of the other way,<br>
: : <br>
: : s = source, t = target, c = center<br>
: : <br>
: : xt = xc + xs * cos ==> xs = ( xt - xc ) / cos<br>
: : yt = yc - ys * sin ==> ys = -( yt - yc ) / sin<br>
: : <br>
: : so first find the 4 boundary points<br>
: : <br>
: : x1 = xc + ( -width/2 ) * cos<br>
: : x2 = xc + ( +width/2 ) * cos<br>
: : y1 = yc - ( -height/2 ) * sin<br>
: : y2 = yc - ( +height/2 ) * sin<br>
: : <br>
: : and now you do:<br>
: : for( yt = y1; yt <= y2; yt++ )<br>
: : for( xt = x1; xt <= x2; xt++ )<br>
: : {<br>
: : xs = ( xt - xc ) / cos<br>
: : ys = -(yt - yc ) / sin<br>
: : <br>
: : // need to check if pixel is in sprite, remember, we are testing the big box of the rotated image<br>
: : if( xs >= 0 && xs < width && ys >= 0 && ys < height )<br>
: : {<br>
: : color = color_from_sprite( xs, ys );<br>
: : draw( xt, yt, color );<br>
: : }<br>
: : }<br>
: : <br>
: : Hope this was helpful<br>
: : <br>
: : : : how can i turn and rotate sprites in VB?<br>
: : : : <br>
: : : And this is difficult question if you want to rotate on 1,2,3,...etc degrees. Rotating on 90 degrees is the easiest you can do, but how to solve this problem?<br>
: : : <br>
: : : Of course use cos, sin and other math things, but the problem is that if you rotate on 15 degrees there exist some black holes in your sprite!<br>
: : : <br>
: : : how to solve this?<br>
: : : Oleg<br>
: : : <br>
: : : <br>
: : : <br>
: : : <br>
: : <br>
: : <br>
: : <br>
: <br>
: <br>
: <br>
<br>