Have you tried tracing the pointItem.x/y/z vars to the console, just
before the render method to make sure they are what you are expecting?

Greg

On Feb 24, 8:58 pm, Darko Radiceski <[email protected]> wrote:
> Any advice or ideas what i should be chasing?
>
>
>
> On Wed, Feb 24, 2010 at 8:04 PM, Dan <[email protected]> wrote:
> > 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
>
> --
> Radiceski Darko
> University of Wollongong
> Australia
> SIFE - UOW Chapter - Alumni
> CASUAL ACADEMIC STAFF TEACHING - UOW SITACS
> (School of Information Technology and Computer Science,University of
> Wollongong)
> Univeristy of Wollongong - Alumni

Reply via email to