问题
I am trying to rotate camera with look-controls.Camera is rotating fine without look-controls.Can somebody tell me how can i rotate camera with look-controls?
回答1:
You'll need to remove or disable look-controls
if you're overriding camera rotation manually.
You can remove the component temporarily with el.removeAttribute('look-controls')
and add the component again afterward.
Or use el.setAttribute('look-controls', {enabled: false})
to disable the component.
来源:https://stackoverflow.com/questions/39579380/a-frame-js-camera-rotation-with-look-controls