Jump to content

Customize amount of panning?


mizuwu
 Share

Recommended Posts

24 minutes ago, Deltakosh said:

This will be possible with next commit using camera.inputs.attached.keyboard.angularSpeed *= 2

I actually tried solving the above problem by using a map and mapping the different keyboard keys to a function that updates the camera.alpha or camera.beta.

if(map["ArrowRight"]){
  camera.alpha -= Math.PI; // This achieves a solution that I was aiming for
  map["ArrowRight"] = undefined;
};

But the way the camera moves is very stiff as it moves directly to that position without the smooth transitions that the default settings propose.

How can I make the transitions smoother?

Link to comment
Share on other sites

2 hours ago, Deltakosh said:

if you update camera.alpha or beta directly there will be no inertia

you should just use the angularSpeed I mentioned previously or update camera.inertialAlphaOffset

I like the angularSpeed solution, but is there also a way for the inertia to stop once it reaches the next specific point that I want it to rotate to?

Link to comment
Share on other sites

5 hours ago, Deltakosh said:

Well yes but you will have to check manually what is the current value of alpha and then set inertialAlphaoffset to 0

Thank you so much for your help! One last question, how can I differentiate events for when a key is pressed vs when a key is held.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...