Open doughamlin opened 7 years ago
Thanks for filing! There's a PR open right now.
I have done it in my fork, branch: project-custom-0.5.0 and find keyword reverseMouseDrag. It's simple to add condition
What about this (shorter code) ? @ngokevin @dmarcos
var modifier = this.data.reverseMouseDrag ? -1 : 1;
rotation = {
x: ( radToDeg(hmdEuler.x) + radToDeg(pitchObject.rotation.x) ) * modifier,
y: ( radToDeg(hmdEuler.y) + radToDeg(yawObject.rotation.y) ) * modifier,
z: radToDeg(hmdEuler.z)
};
@Utopiah Oh thanks, I tho this is added a long time ago. But still not?
@l2aelba not AFAIK cf https://github.com/aframevr/aframe/blob/master/src/components/look-controls.js#L19 but I might be missing something
@Utopiah I am not sure also. But I see something for directions in the doc.
https://aframe.io/docs/0.8.0/core/animations.html#attributes_direction
Long time I am using aframe :D
@l2aelba that's related to entity animation (being replaced by the way, cf https://github.com/aframevr/aframe/pull/3678) and has no relation with look controls.
@Utopiah Aha ! So thanks so much.
@Utopiah closing?
Currently, you can use the following to invert the scroll direction of a camera on desktop:
<a-entity camera look-controls="reverseMouseDrag: true"></a-entity>
This, however, does not work on mobile; it would be useful to have a
reverseTouchDrag
option for mobile.