yomotsu / camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.
https://yomotsu.github.io/camera-controls/
MIT License
1.99k stars 253 forks source link

Truck/Controls Event Listener Disappears after Clicking Twice #523

Closed babophett closed 3 months ago

babophett commented 3 months ago

Describe the bug

I upgraded an old project from version 1.33.1 to camera-controls@latest. I changed all the deprecated code, and almost all the behavior remained except for my previous trucking behavior. Previously I would right click to truck, complete the trucking operation, and then right click again to truck. Now if I truck and want to truck again, the operation won't happen, and the controls event listener doesn't trigger. If I scroll in or out, or left click on some item on the scene, the trucking operation and controls event listener comes back. Any assistance would be greatly appreciated!

To Reproduce

Steps to reproduce the behavior:

  1. Go to latest version
  2. Right click to pan
  3. Right click to pan again

Code

No response

Live example

No response

Expected behavior

I would like to be able to continuously truck, by right clicking multiple times in a row.

Screenshots or Video

No response

Device

No response

OS

No response

Browser

No response

babophett commented 3 months ago

There's even stranger behavior, if I switch the truck to left pan, it behaves normally and the controls event listener doesn't disappear.

babophett commented 3 months ago

Issue with my code