Sign in to follow this  
Followers 0
royibernthal

ArcRotateCamera dynamic mouse sensitivity

9 posts in this topic

I'd like to have an ArcRotateCamera which rotates slower the further the mouse is from the click/touch point (while still pressed/touched).

Imagine pressing/touching anywhere, that's point A, dragging towards some direction to rotate the camera (point B updated while dragging), then releasing. (the same thing that happens now basically)

The further pointA is from pointB, the smaller the sensitivity of the camera rotation.

 

I cleared all inputs and have only mouse input now (PointersInput).

Is there some built-in functionality for such a thing or would I have to implement my own camera input?

http://doc.babylonjs.com/tutorials/customizing_camera_inputs#implementing-your-own-input

If the latter - is there a way to modify an existing camera input or would I have to build one from scratch?

Share this post


Link to post
Share on other sites

It is exposed as radius in the camera itself.  Might be implementable as a scene after renderer where you assign angular sensibility based on camera radius.

Share this post


Link to post
Share on other sites

The same would apply to that no? I'd need to save the radius when the user clicks and compare it to the updated radius every scene render. Or does the radius represent that actual difference between start position (on click) and current position?

Share this post


Link to post
Share on other sites

I thought you zooming, but either way I am not thinking anything needs to be captured on click.  Just set it after every frame, to want you want it to be at certain distances.  You probably want to just plug some guesses as to values in to make sure this can changed inside a click hold.  If so, then refine "good" values once it is know to work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.