Dear all,

I have a sphere to which i would like to add a point. But that sphere
is behaving really weird:

        public function loadLocationOnSphere(x:Number, y:Number,
z:Number):void
        {
                //updating the call
                var pointItem:Sphere = new Sphere( { material:"red", radius:20,
segmentsW:6, segmentsH:4 } );


                        group.addChild(pointItem);

                        var myX:Number = new Number(x);
                        var myY:Number = new Number(y);
                        var myZ:Number = new Number(z);

                        pointItem.x = myX;
                        pointItem.y = myY;
                        pointItem.z = myZ;

                        //pointItem.x = -491.80505;
                        //pointItem.y = -691.41640;
                        //pointItem.z = -2338.26134;

                        this.view.render();

as you can see the code is nothing special.

But the weird thing is that if i pass to the function the values that
are hardcoded in the call the point does not get drawn.

Like: loadLocationOnSphere(-491.80505,-691.41640,-2338.26134); -
doesnt work

But if i remove the comments around the hard coded numbers the point
draws on the sphere.

Can anyone please suggest what could be possibly going on?

Any advice is appreciated.

Sincerely
Dan

Reply via email to