bat78 wrote:I doubt anyone can while i can't reduce the ball's speed Hblade ^^
skydereign wrote:bat78 wrote:dreign, thats drawing in canvas. I cant use canvas. I gived u game as an example what more.
I know, and I gave you a solution that didn't need canvas (as I mentioned twice). You just need to use the same idea as the example I posted.bat78 wrote:The problem is the drawing when u move the mouse fast. It become on dots. Thats all.
The solution to this, as posted at least twice, is to create a line from the previous mouse position to the current one. This is in the same way that the example I previously posted. But since you still don't understand what that means, here is another example.
REDNSX wrote:I want to do the same thing as on this file but I just want a actor to create the "line" actor. I looked at the code on this file but no luck figuring it out.
I first tried draw actor then create actor but it does not work the same way. Do you have the code for just what I want to do?
Thanks
if(state==1)
{
double xp = xmouse_p;
double yp = ymouse_p;
double ang = degtorad(direction(xmouse_p, ymouse_p, xmouse, ymouse));
double dist = distance(xmouse_p, ymouse_p, xmouse, ymouse);
int step = 0;
int d = 10;
while(step<dist)
{
CreateActor("brush", "RotateStar0000", "(none)", "(none)", xp, yp, true);
xp += cos(ang)*d;
yp -= sin(ang)*d;
step+=d;
}
}
xmouse_p = xmouse;
ymouse_p = ymouse;
if(state==1)
{
double xp = xmouse_p + view.x;
double yp = ymouse_p + view.y;
// and so on
}
Users browsing this forum: No registered users and 1 guest