# Formula for 3D movement?

**URL:** <https://forum.kirupa.com/t/formula-for-3d-movement/325838>\
**Category:** flash\
**Created:** [November 7, 2011, 7:01pm UTC](https://forum.kirupa.com/t/formula-for-3d-movement/325838 "2011-11-07T19:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thelonesoldier](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@thelonesoldier](https://forum.kirupa.com/u/thelonesoldier)\
**Post date:** [November 7, 2011, 7:01pm UTC](https://forum.kirupa.com/t/formula-for-3d-movement/325838/1 "2011-11-07T19:01:44Z")

</div>

Hi,

I’ve been trying to look this up but not had any luck so far. I’m trying to make a simple pseudo-3D app, but I’m stuck on how to pull off the movement. If I have an object with x,y,z coordinates, and its movement speed, pitch, and yaw, what formula would I use for movement? So for example, if the object is at 0,0,0, moves 6 units per frame, and has pitch 30 degrees and yaw 15 degrees, what will be its coordinates next frame?

I’ve used the sin/cos/atan formula to move an object along a heading in 2D space, but I’m not sure how to translate this to 3D. I’ve never been great with trig \>\_\<

Much appreciated.
