Drag and Drop in Cesium

Hi,
I need help, I have created many entities that can be moved using ScreenSpaceEventHandler and it works, but now I have ScreenSpaceEventHandler associated with each entitу, which means when I create a new entitу I have a new ScreenSpaceEventHandler created… As I understand it is a globаl event, and when i created 1000 entitу i have 1000 ScreenSpaceEventHandler , and my application start to freeze. I think that this is related to a lot of created global ScreenSpaceEventHandler, that is what affecting the performance.
Can you explain to me what is the right way to manage this ScreenSpaceEventHandler, because each of them has its own function…
After that I tried to use events on the entity itself (as onMouseMove etc.) but when I move the mouse quickly the mouse moves away from the entity area and the event stops running, can you please help what I am doing wrong.

Thanks in advance…

Hi @Rustam_Gasymov , I had a similar requirement. It should not be difficult to resolve. You can create single ScreenSpaceEventHandler and operate any selected entity with that. You can store seleted entity in a variable (something like var selectedEntity = null) on mouse click. Now ScreenSpaceEventHandler will work with this variable only. You can re-assign any other entity to this variable.

hey, thanks a lot for your attention… Right now i do same and use camera.pickEllipsoid(e.endPosition) for converting Cartesian 2 to Cartesian 3, its right? and still i have a freeze in my app, can you advise me how to improve performance

hey, thanks a lot for your attention… Right now i do same and use camera.pickEllipsoid(e.endPosition) for converting Cartesian 2 to Cartesian 3, its right? and still i have a freeze in my app, can you advise me how to improve performance

You have to be clear first that freeze/lag issue is causing due to large number of entities OR by ScreenSpaceEventHandler. You can search about multiple entities management in this forum.