Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveTo changes target incorrectly #514

Open
richfwebb opened this issue Jun 4, 2024 · 0 comments
Open

moveTo changes target incorrectly #514

richfwebb opened this issue Jun 4, 2024 · 0 comments

Comments

@richfwebb
Copy link

richfwebb commented Jun 4, 2024

In some cases, moveTo moves to an incorrect position.

Using this example,
https://yomotsu.github.io/camera-controls/examples/basic.html

Press the buttons:

moveTo(3, 5, 2)
lookAt(3, 0, -3)

Then repeat, and you can see the camera position keeps growing.
This doesn't seem the intended behavior.

There's also a separate sequence of presses where the camera stops moving at all, if you experiment, no matter how many times you hit moveTo(3,5,2) or moveTo(-5,2,1). Maybe I misunderstand this method, and this is expected.

--

On a related note, how to correctly move the camera for third person view of a moving character that updates each frame? Maybe could add this to the docs?

I tried: moveTo, setTarget, add the camera as a child of a target object, etc. still not really sure what's right. Thanks for this great library btw!

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on moveTo(3, 5, 2), then click lookAt(3, 0, -3), then repeat
  3. See error

Code

No response

Live example

No response

Expected behavior

target should move to coordinates described by the button

Screenshots or Video

No response

Device

Desktop

OS

Linux

Browser

Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant