# About the z-axis in 2D

**URL:** <https://forum.kirupa.com/t/about-the-z-axis-in-2d/311735>\
**Category:** Uncategorized\
**Created:** [July 15, 2010, 3:56am UTC](https://forum.kirupa.com/t/about-the-z-axis-in-2d/311735 "2010-07-15T03:56:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OMG](https://avatars.discourse-cdn.com/v4/letter/o/9dc877/32.png) [@OMG](https://forum.kirupa.com/u/OMG)\
**Post date:** [July 15, 2010, 3:56am UTC](https://forum.kirupa.com/t/about-the-z-axis-in-2d/311735/1 "2010-07-15T03:56:57Z")

</div>

hi  
I’m making a game where the area contains 3 dimensions. A ball can move left and right (x axis), bounce in the air (y axis) and up and down (z axis), like in a 2d scrolling game. Imagine a fighting game like street fighters, but the ppl can move up and down too.

the problem is that I have no idea how to simulate the z axis. For example, I have two balls, initially at the same position, that move to the right with an angle of 20 degree between them (on the z axis. So in a normal perspective the balls are still sticking on the ground but in a flash simulation we see that one ball is going up and one ball is going down).

if it were just a simple simulation I could go lazy and directly change the x and y axis to create the same effect, but in this project I need to know a way (maybe a formula) to actually control the z axis and to adjust the balls’ y position according to it. Any help?

Thanks.
