# Z position performance

**URL:** <https://forum.kirupa.com/t/z-position-performance/281220>\
**Category:** flash\
**Created:** [February 6, 2009, 3:15am UTC](https://forum.kirupa.com/t/z-position-performance/281220 "2009-02-06T03:15:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enridp](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@enridp](https://forum.kirupa.com/u/enridp)\
**Post date:** [February 6, 2009, 3:15am UTC](https://forum.kirupa.com/t/z-position-performance/281220/1 "2009-02-06T03:15:50Z")

</div>

Hello !  
I’m trying to make a floor in 3D, the user can rotate it i X axis and move in any coordinate (X,Y,Z). The code works good, but when I move in Z coordinate all the moves are really slow. I think it’s because Flash creates a Matrix3D and for every move calculates this:  
X = x_cameraFocalLength/cameraRelativeZPosition  
Y = y_cameraFocalLength/cameraRelativeZPosition  
I don’t know how to solve this, can somebody tell me some tips to rise the performance?

Thanks!!!  
PS: sorry for my bad english  
PS2: this is my code: (enterframe Event)  
function MoveUp(e:Event):void  
{  
this.MC.y+=5_Math.cos(angle);  
this.MC.z+=5_Math.sin(angle);  
}
