alexvoz / as3isolib

Automatically exported from code.google.com/p/as3isolib
0 stars 0 forks source link

moveTo and moveBy round the numeric input to integers #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add an IsoBox to the scene
2. Use myIsoBox.moveTo(0.5, 1.2, 0) (or moveBy, if preferred)
3. Render the scene
4. Check the box's coordinates with myIsoBox.x, .y and .z

What is the expected output? What do you see instead?
I expect the box to be at coordinates (0.5, 1.2, 0), since Flash supports 
decimal values.
Instead, the box will be at coordinates (1, 1, 0).

What version of the product are you using? On what operating system?
as3isolib.v1.core, Windows 7

Original issue reported on code.google.com by jocke...@gmail.com on 27 Dec 2011 at 1:09

GoogleCodeExporter commented 9 years ago
I just took a look at the definition of IsoDisplayObject. Let's take z as 
example.

        public function set z( value:Number ):void{
            if ( !usePreciseValues )
                value = Math.round( value );

            if ( isoZ != value )
            {
                oldZ = isoZ;

                isoZ = value;

                if ( autoUpdate ){
                    render();
                }
            }
        }

You should set "usePreciseValues" to true so as to skip the rounding part

Original comment by patrick....@gmail.com on 26 Jan 2012 at 10:34