# Created a NavBall for Cesium

**URL:** <https://community.cesium.com/t/created-a-navball-for-cesium/35034>\
**Category:** CesiumJS\
**Created:** [September 9, 2024, 12:35pm UTC](https://community.cesium.com/t/created-a-navball-for-cesium/35034 "2024-09-09T12:35:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zudo](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zudo/32/24314_2.png) [@Zudo](https://community.cesium.com/u/Zudo)\
**Post date:** [September 9, 2024, 12:35pm UTC](https://community.cesium.com/t/created-a-navball-for-cesium/35034/1 "2024-09-09T12:35:13Z")

</div>

Hello Cesium community !

I am currently working in an interface between [Orekit](https://www.orekit.org) and [Cesium](https://cesium.com), that I already presented briefly in [this topic](https://community.cesium.com/t/solar-system-body-positioning-with-czml/34714) named [OreCzml](https://gitlab.orekit.org/Zudo/oreczml).

For this tool, I needed to create a NavBall for the user. Whiwh should looks like this :

 ![image](https://global.discourse-cdn.com/cesium/original/3X/9/4/94bf6e005356b448a44572fb9031741457eb84eb.jpeg)

In order to do so, I created a repository, where I added a few features to the UI of Cesium : [link here](https://gitlab.orekit.org/Zudo/oreczmljsinterface).

To do so here are the steps that I followed :

- I created a 3D model of a navball (you can find it in the repository : “public\>navball.glb”)
- I created a navball entity, knowing the position of the camera at any moment. Then converting the (x,y,z) cartesian position of the camera into spherical one. Adding a fixed offset in the spherical system, then converting back into the cartesian coordinates for the location of the navball. (You can find this at “src\>index.js\>from line 46 to 126”)
- Loading the 3D model of the navball. (“src\>index.js\>line 166”)
- (Not mandatory) Added a button to display or not the navball.

I hope this will help people that could need to do a navball with cesium.

If you have question about the navball or about anything related to the project, feel free to ask.

JL.

---

<div class="post-metadata">

**Author:** ![Luke\_McKinstry](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/luke_mckinstry/32/25557_2.png) [@Luke\_McKinstry](https://community.cesium.com/u/Luke_McKinstry)\
**Post date:** [September 10, 2024, 3:23pm UTC](https://community.cesium.com/t/created-a-navball-for-cesium/35034/2 "2024-09-10T15:23:01Z")

</div>

Hi 👋,  
Thank you so much for sharing your work with us. This looks awesome.  
Your approach to use a 3D model to create the navball is really creative and I really like it.  
Excited to see how other people use it!

---

<div class="post-metadata">

**Author:** ![Luke\_McKinstry](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/luke_mckinstry/32/25557_2.png) [@Luke\_McKinstry](https://community.cesium.com/u/Luke_McKinstry)\
**Post date:** [September 10, 2024, 3:57pm UTC](https://community.cesium.com/t/created-a-navball-for-cesium/35034/3 "2024-09-10T15:57:16Z")

</div>

I just checked with our comms team, if you share this on social media please let us know and we would be happy to re-share it!

---

<div class="post-metadata">

**Author:** ![Zudo](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zudo/32/24314_2.png) [@Zudo](https://community.cesium.com/u/Zudo)\
**Post date:** [September 11, 2024, 11:53am UTC](https://community.cesium.com/t/created-a-navball-for-cesium/35034/4 "2024-09-11T11:53:50Z")

</div>

Hello @Luke_McKinstry , I will propably not share it on social media, but you can if you want to reproduce it, but thank you !

For the moment, here is a display of what is looks like in Cesium:

![forum cesium](https://global.discourse-cdn.com/cesium/original/3X/a/5/a54a31d95a83cf7b5fa21a8e3010c75a2a87d544.gif)

The navball can’t be refreshed every seconds on the display because my computer is not powerfull enough (I don’t even have a GPU) but it should have a better result on better computers !

JL
