[ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- From: André Michelle <ascoders@xxxxxxxxxxxxxxxxxx>
- To: <ascoders@xxxxxxxxxxxxx>
- Date: Wed, 13 Oct 2004 22:45:27 +0200
Probier doch erstmal ein einfaches easing:
var angle: Number = 0;
onEnterFrame = function()
{
var cAngle: Number = Math.atan2( center._ymouse, center._xmouse );
var diff: Number = cAngle - angle;
if( diff > Math.PI ) diff -= Math.PI * 2;
if( diff <-Math.PI ) diff += Math.PI * 2;
//-- EASING
angle += diff / 8;
//-- DRAW ANGLE
center.clear();
center.lineStyle( 0 , 0xffcc00 );
center.lineTo( Math.cos( angle ) * 100, Math.sin( angle ) * 100 );
}
Du brauchst nur einen 'center' MovieClip auf der Bühne.
--
aM
------------------------------------------------------
Archiv : http://www.freelists.org/archives/ascoders/
Optionen : http://www.freelists.org/list/ascoders
------------------------------------------------------
- Follow-Ups:
- [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- From: André Michelle
- References:
- [ascoders] AW: Re: Rotation nach Mausposition *gedämpft*
- From: Timo Hölzer
Other related posts:
- » [ascoders] AW: Re: Rotation nach Mausposition *gedämpft*
- » [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- » [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- » [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- From: André Michelle
- [ascoders] AW: Re: Rotation nach Mausposition *gedämpft*
- From: Timo Hölzer