Привет!
Помогите создать имитацию того, что шар действительно "катится" по земле, а не просто движется.
Большая часть кода уже написана, осталось доделать только это.
Нужно что-то химичить с _rotation, но как правильно не могу въехать.

Код AS1/AS2:
xVel = 5;
yVel = 5;
gravity = 1.2;
fr = 0.7;
radiusH = ball._height/2;
radiusW = ball._width/2;
angle = 10;
shakeI = 50;
oldShakeI = shakeI;
shaking = false;
ball.onEnterFrame = function()
{
yVel += gravity;
this._x += xVel;
this._y += yVel;
if (this._y>=Stage.height-radiusH)
{
this._y = Stage.height-radiusH;
yVel *= -1;
if (yVel<=-10)
{
shaking = true;
createParticles(int(Math.random()*50)+1,this);
createSmoke(30,70,this);
}
else if (yVel<=-20)
{
createParticles(int(Math.random()*5)+1,this);
createSmoke(5,70,this);
}
}
if (this._y<=0+radiusH)
{
this._y = 0+radiusH;
yVel *= -1;
}
if (this._x>=Stage.width-radiusW)
{
this._x = Stage.width-radiusW;
xVel *= -1;
}
if (this._x<=0+radiusW)
{
this._x = 0+radiusW;
xVel *= -1;
}
};
}
Заранее спасибо за помощь!