min and max values on 3d objects are measured locally, so if they are
different between your cube and container, it is because the container will
be performing some sort of transformation on the cube.

if you need absolute min and max values, you can try transforming the
properties you receive using the scenetransform property of the object in
question.

Rob





On Tue, Sep 14, 2010 at 7:58 PM, Gabriel Jensen <[email protected]>wrote:

> Btw, I have read the posts on this issue, in particular:
>
>
> http://groups.google.com/group/away3d-dev/browse_thread/thread/a8ca76a06b4196cd/a1b3ee0fcd968616?lnk=gst&q=minx#a1b3ee0fcd968616
>
> ...but I thought it should be accurate if the container has only one
> child.
>
> Also, I am using Away3D 3.5.0.
>
> Thx,
>
> -Gabriel
>
>
> On Sep 14, 11:49 am, Gabriel Jensen <[email protected]> wrote:
> > I'm working on a puzzle game in Away3D. Anyone know why a Cube wrapped
> > in an ObjectContainer3D would have different minX,maxX (etc.) than the
> > Cube?
> >
> > I am not scaling or doing any other transformations:
> >
> >         import away3d.containers.ObjectContainer3D;
> >         import away3d.containers.View3D;
> >         import away3d.core.math.Number3D;
> >         import away3d.primitives.Cube;
> >
> > {...}
> >                         view = new View3D({x:300, y:200});
> >                         addChild(view);
> >
> >                         var cube:Cube = new Cube({
> width:100,height:100,depth:100});
> >                         trace ("cube minY,maxY:" + cube.minY, cube.maxY)
> >
> >                         var container:ObjectContainer3D = new
> ObjectContainer3D();
> >                         container.addChild(cube);
> >                         view.scene.addChild(container);
> >                         trace ("container minY,maxY:" + container.minY,
> container.maxY)
> >
> > output:
> >
> > >cube minY,maxY:-50 50
> > >container minY,maxY:-86.60254037844386 86.60254037844386
> >
> > Thanks a lo...,
> >
> > -Gabriel
> > Pizmo Gameshttp://www.pizmogames.com
>



-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to