Now I solved by myself .  :'(
the code Cut from demo website:
it can be set at anywhere:
==================================
speed is rotation default speed, it can be ignore. Set it for a lot of
round space have a different speed easyly.
piRad is deal for angle to rad.
==================================
==================================
var speed:Number = 1
var piRad:Number = Math.PI / 180
function aroundSphere(dx:Number,dy:Number) : void{
        var rx:Number = (-dx / speed) * piRad;
        var ry:Number = (-dy / speed) * piRad;
        var rxs:Number = Math.sin(rx);
        var rys:Number = Math.sin(ry);
        var rxc:Number = Math.cos(rx);
        var ryc:Number = Math.cos(ry);
        var extra:Number = z * ryc - x * rys
        x = z * rys + x * ryc
        z = y * rxs + extra * rxc
        y = y * rxc - extra * rxs
}
==================================
==================================
On 11月15日, 下午11时44分, mogg <[email protected]> wrote:
> One of the simplest ways is to use an  "ObjectContainer3D" and place
> your visiable object inside this object container.
>
> Steps:
> 1) Add an empty "ObjectContainer3D" to the scene
> 2) Then add your other object (sphere) inside this
> "ObjectContainer3D".
> 3) To do "free rotation" only rotate one axis of each of these two
> object.
> 4) Rotate the X axis of your inner object (sphere) and then rotate the
> Y axis of the outer object "ObjectContainer3D".
>
> Play around with the results. Try swapping which axis you rotate on
> each object.
>
> This should give you the free rotation you are looking for.
>
> On Nov 15, 3:37 am, "[email protected]" <[email protected]> wrote:
>
> > I want to do some interest thing. So I created a sphere, and rotate it
> > by change mouse position. And if I turn the yAxis to another side ,
> > the sphere will not rotate will mouse will.
>
> > So if you cant understand, then see the website. It can free rotation
> > it easyly.
>
> > exp:http://www.speakinthumbs.com/

Reply via email to