Reputation: 43
For example 1.to allow rotation about z-axis only from -70 to 70 degree or 2.to block rotation about about an arbitrary axis
thnx
Upvotes: 1
Views: 1018
Reputation: 13233
You can copy and paste the look-controls component: https://github.com/aframevr/aframe/blob/master/src/components/look-controls.js
As I have done at https://github.com/ngokevin/kframe/blob/master/components/reverse-look-controls/index.js
And when the component goes to update the orientation, you can constrain it yourself with something like Math.min/Math.max
Upvotes: 1