CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.03k stars 3.51k forks source link

add a controller to run function strafe when i pan 3dtiles model #9331

Closed happyfeet1996 closed 3 years ago

happyfeet1996 commented 3 years ago

It happend when I keep left mouse down to pan 3dtiles model, when the camera.position.z > mousemoveStartPosition,z,camera run function pan3d,when the camera.position.z < mousemoveStartPosition.z,camera run strafe function, i need a variable as the delta between camera.position and mousemoveStartPosition to run function strafe.

hpinkos commented 3 years ago

Hello @happyfeet1996. I'm sorry, I don't understand what you're asking for. If you have any questions, please use our community forum: https://community.cesium.com/ We use GitHub exclusively for tracking bugs and feature requests

happyfeet1996 commented 3 years ago

Hello @happyfeet1996. I'm sorry, I don't understand what you're asking for. If you have any questions, please use our community forum: https://community.cesium.com/ We use GitHub exclusively for tracking bugs and feature requests

Sorry, I didn’t describe it clearly. I mean, when I want to drag the model with a left click, when the height of the selected point of my mouse is higher than the height of the camera, the model will pan, but when the height of the selected point is lower then the height of the camera, the model will rotate around the center of the earth. This is understandable, but when the camera height and the height of the selected point are very close but less than the height of the selected point, it will cause such a problem. The model rotates too fast around the center of the earth and causes the model to fly away.