Exponential inertia for ArcRotateCamera

Hello guys,

I recently encountered the webgl configurator of Smart: Car_Configurator_smart_EQ_fortwo_prime

While playing around with it I noticed that they solved the camera handling very nicely. It feels very smooth in my opinion:

While dragging the camera inertia equals 0. On pointerup inertia will be set to a specific value but it behaves exponentially. In bjs in feels more linear. Is it possible to adapt it to the behavior of the Smart configurator? If you spin the cube it should rotate fast and then stop quickly.


1 Like

I could see something that could modify the inertia (default is 0.9; movement is calculated as inertialAlpha/BetaOffset *= inertia) so that the faster you drag, the higher it goes and then it decreases to some value after a pointerup event is registered. Depending on implementation, it may require tweaking the values for angularSensibilityX and Y (lower is faster; default is 2000) in camera.input.attached.pointers. The only issue with this approach is that it’d require inertia to be changed dynamically and incrementally in some place (For example, it could be modified back to normal inside of scene.beforeRender when the pointerup event occurs).

1 Like

Hello @samevision just checking in if your question was answered? :slight_smile: