[ascoders] AW: Re: Rotation nach Mausposition *gedämpft*
- From: Timo Hölzer <t.hoelzer@xxxxxxxxx>
- To: <ascoders@xxxxxxxxxxxxx>
- Date: Wed, 13 Oct 2004 22:40:56 +0200
Hi André
Danke erstmal für Deien Hilfe...
So soll's sein, allerdings ohne den Fehler auf 9 Uhr
---------------------------------------------------------------
onClipEvent(enterFrame) {
this.r = Math.atan2(this._parent._ymouse-this._y,
this._parent._xmouse-this._x)/Math.PI*180;
this.rpos = (this.rpos*0.8)+((this.r-this._rotation)*0.2);
this._rotation += this.rpos
}
---------------------------------------------------------------
Mit deinem Code zuckt der Clip nur vor sich hin
---------------------------------------------------------------
onClipEvent(enterFrame) {
this.r = Math.atan2(this._parent._ymouse-this._y,
this._parent._xmouse-this._x)/Math.PI*180;
this.rpos = (this.rpos*0.6)+((this.r-this._rotation)*0.2);
while( this.rpos > Math.PI ) this.rpos -= Math.PI*2;
while( this.rpos <-Math.PI ) this.rpos += Math.PI*2;
this._rotation += this.rpos
}
---------------------------------------------------------------
Ich hab schon ziemlich viel probiert, aber ich komm
irgendwie nicht dahinter :(
Timo
-----Ursprüngliche Nachricht-----
Von: ascoders-bounce@xxxxxxxxxxxxx
[mailto:ascoders-bounce@xxxxxxxxxxxxx]Im Auftrag von André Michelle
Gesendet: Mittwoch, 13. Oktober 2004 21:36
An: ascoders@xxxxxxxxxxxxx
Betreff: [ascoders] Re: Rotation nach Mausposition *gedämpft*
probier mal:
this.rpos = (this.rpos*0.6)+((r-this._rotation)*0.2);
while( this.rpos > Math.PI ) this.rpos -= Math.PI*2;
while( this.rpos <-Math.PI ) this.rpos += Math.PI*2;
this._rotation += this.rpos
--
aM
------------------------------------------------------
Archiv : http://www.freelists.org/archives/ascoders/
Optionen : http://www.freelists.org/list/ascoders
------------------------------------------------------
------------------------------------------------------
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
- [ascoders] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- From: Mario Klingemann
- References:
- [ascoders] Re: Rotation nach Mausposition *gedämpft*
- From: André Michelle
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] Re: AW: Re: Rotation nach Mausposition *gedämpft*
- From: Mario Klingemann
- [ascoders] Re: Rotation nach Mausposition *gedämpft*
- From: André Michelle