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
Hey! We're using dolly and wanting to swap out camera drivers at runtime (specifically Rotation and YawPitch). There are no helpers to expose this in the public API, but since the driversVec is (perhaps unintentionally) pub we can patch those in. Is that an intended use-case?
As an alternative approach we also looked into having both drivers on the stack so that we could set one of the two to IDENTITY, but as it turns out dolly doesn't really stack the drivers sequentially, instead the Position/Rotation/YawPitch (and maybe all the other) drivers replace a translation or rotation on update(), meaning only the last rotation or position sticks. This is also visible in the README example, where a camera has a Rotation (that is updated) but useless because the subsequent LookAt overwrites the rotation.
The text was updated successfully, but these errors were encountered:
Something I just had in mind (for my specific use-case) is a function that takes a generic A and B: it tries to find A in the driver stack and if it finds it, it replaces it with a (default initialized or passed?) instance of B and returns a (mutable) reference. If it finds B instead, it immediately returns a reference to it.
Though that seems weirdly add-hoc and ugly, and it is perhaps cleaner to just have my A/B on the stack sequentially, while the rotations are multiplied in update(), so that I can zero out one or the other.
Swapping of drivers at runtime is not something I've given any thought. When changing cameras in my apps, I'm just replacing the entire rig, and so far that has worked fine. That might not be sufficient for your use case, but in practical terms I won't have the resources to look into this myself 👀 😅
Hey! We're using
dolly
and wanting to swap out camera drivers at runtime (specificallyRotation
andYawPitch
). There are no helpers to expose this in the public API, but since thedrivers
Vec
is (perhaps unintentionally)pub
we can patch those in. Is that an intended use-case?As an alternative approach we also looked into having both drivers on the stack so that we could set one of the two to
IDENTITY
, but as it turns outdolly
doesn't really stack the drivers sequentially, instead thePosition
/Rotation
/YawPitch
(and maybe all the other) drivers replace a translation or rotation onupdate()
, meaning only the lastrotation
orposition
sticks. This is also visible in theREADME
example, where a camera has aRotation
(that is updated) but useless because the subsequentLookAt
overwrites the rotation.The text was updated successfully, but these errors were encountered: