You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In my use-case, there are certain conditions where I need to have direct control over the roll of the camera, and the per-frame call to this._camera.lookAt(this._target) forces the roll to always be locked to maintaining a local y-up orientation.
Describe the solution you'd like
There are two broad approaches I think will work
Simply disable lookAt in the update loop. For my own testing this is all I've done - create a class property alwaysLookAtTarget: boolean (default: true), and only call lookAt in the update loop if it's true. It works as desired, but it's a bit of a brute force solution since it breaks existing rotation behavior when it's disabled.
A more comprehensive roll solution, with rollTo etc similar to the other control parameters, that is applied after lookAt so that it will override it. I'm unsure how well this approach will work.
Describe alternatives you've considered
I think it might be possible to simulate what I want by updating the cameras up-vector per-frame during transformations, but to be honest the math here is not clear to me, and I'm unsure if it will actually do what I need in terms of giving manual control over roll.
Additional context
I can make a PR for my alwaysLookAtTarget solution if the maintainers think it will fit the library design.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In my use-case, there are certain conditions where I need to have direct control over the roll of the camera, and the per-frame call to
this._camera.lookAt(this._target)
forces the roll to always be locked to maintaining a local y-up orientation.Describe the solution you'd like
There are two broad approaches I think will work
lookAt
in the update loop. For my own testing this is all I've done - create a class propertyalwaysLookAtTarget: boolean
(default: true), and only calllookAt
in the update loop if it's true. It works as desired, but it's a bit of a brute force solution since it breaks existing rotation behavior when it's disabled.rollTo
etc similar to the other control parameters, that is applied afterlookAt
so that it will override it. I'm unsure how well this approach will work.Describe alternatives you've considered
I think it might be possible to simulate what I want by updating the cameras up-vector per-frame during transformations, but to be honest the math here is not clear to me, and I'm unsure if it will actually do what I need in terms of giving manual control over roll.
Additional context
I can make a PR for my
alwaysLookAtTarget
solution if the maintainers think it will fit the library design.The text was updated successfully, but these errors were encountered: