Hi, i need help, i am a new user of cessiumjs, i created airplane (the entities) and my plane flies in a circle through certain points that i get from the data, i need to get this position when the plane flies over point, thanks a lot
Hi @Rustam_Gasymov , Welcome here!
You can use Cesium.Cartesian3.distance to check the distance between 2 catesian3 values (plane’s and point’s positions). To get the plane’s current Position (which is a SampledPositionProperty) you can use something like: entity.position.getValue(clock.currentTime)
Here is a sandcastle example. Check it’s console for result.
Check the line number 36, 52 and 167
which I’m using to check if plane is over any point.
There can be other ways too, like drillPick and external libraries like: turf.js to detect positions intersections. But In our case it’s not required.
I hope it helps you! Please let us know if you need anything else to know.
- Regards
Hello, I am very grateful for such a quick response, which helped me a lot. Tell me, I need to use your library in REACTjs, how do I do it?
thanks a lot
I’m glad to help you