# How to keeping pitch of model with VelocityOrientationProperty?

**URL:** <https://community.cesium.com/t/how-to-keeping-pitch-of-model-with-velocityorientationproperty/29925>\
**Category:** CesiumJS\
**Created:** [February 15, 2024, 7:16am UTC](https://community.cesium.com/t/how-to-keeping-pitch-of-model-with-velocityorientationproperty/29925 "2024-02-15T07:16:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leafmire](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/leafmire/32/19772_2.png) [@Leafmire](https://community.cesium.com/u/Leafmire)\
**Post date:** [February 15, 2024, 7:16am UTC](https://community.cesium.com/t/how-to-keeping-pitch-of-model-with-velocityorientationproperty/29925/1 "2024-02-15T07:16:52Z")

</div>

Hi I am implementing a simulation of a drone model in cesium.

The position of the drone has a SampledPositionProperty and I am using VelocityOrientationProperty for orientation.

I want the drone to move in a horizontal state (I think this is when the pitch is 0).

I tried modifying the VelocityOrientationProperty.js, but the direction the drone is looking is different from the direction it is traveling.

 ![Drawing](https://global.discourse-cdn.com/cesium/original/3X/4/1/410e2365860d143e1713e91392e88ba3fd6f26e6.png)

If you have any ideas, I would appreciate it.

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [February 16, 2024, 5:01pm UTC](https://community.cesium.com/t/how-to-keeping-pitch-of-model-with-velocityorientationproperty/29925/2 "2024-02-16T17:01:33Z")

</div>

Hi there,

Do you know if the drone model has the correct forward axis?

It may help if you post a [Sandcastle example](https://sandcastle.cesium.com/) with a minimal code snippet.

---

<div class="post-metadata">

**Author:** ![Leafmire](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/leafmire/32/19772_2.png) [@Leafmire](https://community.cesium.com/u/Leafmire)\
**Post date:** [February 26, 2024, 6:16am UTC](https://community.cesium.com/t/how-to-keeping-pitch-of-model-with-velocityorientationproperty/29925/3 "2024-02-26T06:16:43Z")

</div>

Hi, I was able to find a sandcastle with something similar.

[Hello World - Cesium Sandcastle](https://sandcastle.cesium.com/index.html?#c=zVVdb9owFP0rFi8JUmRCO1UrpdVWxtpKbHSUUVXLHkxiwJpjR7YDpFX/+2xsCAGmlZdpkSrV177nnnvuB3MkwJzgBRbgEjC8AB0sSZ7C0crme/Hq2OFMIcKw8OoXEYvYXHtxQaaEVb06SCj9H2KncCJ4+glPBcbSb54F4J3+Ow3D0AAYd4XEFKs3usP3BgCeBODMQUSs0QB9SyHjhCmNuqIMMVNEESwhShL/JWJAfxmX2sZZy7EO1mbtCFrAvTJfzCkXrQ0hc4K9u5vb4XXvezco32VkiekDecYtcBJu2XmuqBaqcwDm8fZu2N1/+kgSNdMo9uLVPaBojGmFmcJL1QKezdnbpdKfTCTW9y9g2QJhAArDa4NmvjkWisSIWoANt1HFDIf9e0ckYq8boYe2WMcIbet7nNA3g27361O31+s//g9S26z/sdR61DCQM57TxMmmOPCsmh4wYwE828SeHaSECBwbzfUs7c+RzMdKoFj5rh7rATg8dn7d8NhHYVykiOoS+JtoQRm43AmCK2QsX5ASZFkSGgrE5ESDSFh98lnnc+96ZoQpj4kq/DXFSgAHfx6WqBbC7oqBg33yy8sZVHyAEp2B9M/D7dTWnmlOFclo4VdZBTZSsJOPy/PoNaMP+jWyN47BtxwpLJg2VejbQH7ZSlUG1l53uHGhmzrBotK7FLOpafKmXpTb06J4ZrTIpenZ0jzmSunw7ua06pMajgTRP+1DuCBq9pFmM+SH8H39QDePiMxXjVMWc6drB6g42Ljr0lwXD3pkkNjuvFVu4ZE9bOq011k6evX0hhpTIzuuiL4uvJbwx6EYP7dEXdgl1Py7zqsttiuqo/bMeTrk/g7R+kUtqLWlKii+so4fSJpxoUAuqA9hQ+E0ozqabIzz+BdWMJbS4LYba6d2QuaAJJdRbeenP6qBmCIp9c0kp6uFHNWu2g39vuJGuW4mNu3rJUhRYZ7Mmlc9a4QQthv6uO+lOKdjJLYQfwM)

I added a bit of calculation to this example to get the angle and was able to get the results I wanted.  
thanks for response.

> **[Cesium Sandcastle](https://sandcastle.cesium.com/index.html#c=zVbfk9IwEP5XMrxQxhrAU0cRbzwRf8ygnIh3o9aH0AaIpgmTpNxxjv+7myalFIp6L459uLkku99++212w5ootGb0iir0FAl6hQZUsyzFF/le0Izz5UAKQ5igqtl6EolIrMFLKrZgouo1IMrAf0Sc4LmS6Qu6UJTqoPsQ3wvR/QchOul0OhbCAhiiFtT8LcADC4C7IXrkISLRbqOxI7GSTBhAzUljKgwzjGpMkiT4EQkE30pq2JOi53mHxTY4oh7yVvaLJZeqtyVkV3j05tXr6fPRx2FY2q3YNeUf2A3toXudnX2ZGQ5SDWpgLl+/mQ4PTS9ZYpaA4g5+egNOZpRXmBl6bXqo6XJu7lMZz+eawvkPdN1DnRBtLK8tmv3WVBkWE+4AttwuKtt4Oj73RCLxcyv01BXrNkK7+t5O6FeT4fDdp+FoNL78H6R2Wf9jqaHZKNJLmfHEy2Ykajo1m8i2BWq6S9x0jZQwRWOrOfTSYR/pbGYUiU3g61E0QH3bBS3HA0SBclPYXw6gzFRN5bmv7O+juIQqTXZo/Xk4GfvDIyzsoWVS5y2kSgmH6xDU8gvraW/1Bf3jjBND89hKGmKPI2ET3kr5roiR1KZbUth6hKWzDZWjSXOuZJLFphYEjo9lUMOjACViwemEJAChAfYtMUtMYqmDMlrF1M/QkkHuYWQxW3fxCscl1O/Gznx+lnzLtEmB4Jm1AxT0uIPu2D93K/jbd6EQFMIodl2GnSoIMId0NK6avIQbXWR+QbmMmdkExSU9IoQPBCx20wIw925MfIBPQTVnn2ZwNL/89u8Bphk3bMU3QZV26AiEewn7B/LWLxEswJq4E8/gfQa3VAnYqmTlAgXltKkycPstjxtvYO4lVFXGG6diYedgF97S3YFq5MpKlGk71srtmTQGwvuTk6pPajkywo89mfiKmeUZXy1J0MGPWjUD74LpLC9tWe29wTYhm9oOKkrzfPMBupqo3W7Mc+v8dswdAto6HVw9iF5d/UWNuZWdVkQvCg8SfqmL8XVH1Cv3TnX/rHP+0O2L6qndSJlOZbBHtPWkETb62mw4PXWOz1i6ksqgTPEA47ah6crOR92eZfF3anCs88nQbxdO/YStEUueRo2934dRA8WcaA0n84znb3bUOO23wb7ixiVcJrEYwzvJycaaLLunI7eJMe63YXnoZaTkM6J2EH8B)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.
