What's the better way to make a coin rotation? I tried Math.random, but the coin doesn't wobble correctly.
starter code
//ROTATION
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event):void
{
/*
ADD VELOCITY, GRAVITY, ACCELERATION
*/
coin.rotationY += 8;
}
tried this, but it has no gravity or accelleration
//ROTATION AND RANDOM MATH
function wobble():void {
var wobble = ((Math.random()*4)-2);
flk.rotationY -= 11+wobble/2;
flk.rotationX -= 2+wobble/20;
}
var myInterval:uint = setInterval (wobble, 40);