While testing I noticed the great working gyrocontroller when moving my tablet. But when I embed my forgejsproject with a iframe on another page, it does not work anymore. Is this correct and is it possible to get it working when embedded as a iframe.
And is it possible to have gyro controll and touch controll at the same time? Now in the embedded version I can change direction with touch, but when giro works, touch does not move..
(version 0.9.5)
gyrocontroller
Re: gyrocontroller
I found out that iframe url has to be relative for the gyrocontroller... so with external url's it does not work... I think
but would love to have both controllers: pointer and qyroscope...
but would love to have both controllers: pointer and qyroscope...
Re: gyrocontroller
Hi nedr,
As far as I know you can't have both gyro and pointer controller at the same time.
It is not as trivial as it sounds to implement this feature.
If you know how to code this feature, I'll be glad to review your pull request on Github
Have a nice day !
As far as I know you can't have both gyro and pointer controller at the same time.
It is not as trivial as it sounds to implement this feature.
If you know how to code this feature, I'll be glad to review your pull request on Github

Have a nice day !
- Raphaël
Re: gyrocontroller
Hi rroux,
Thx for your fast reply. I understand. I will try some stuff
Is it possible to turn the gyro on or off? in the json? or in the player maybe?
Thx for your fast reply. I understand. I will try some stuff

Is it possible to turn the gyro on or off? in the json? or in the player maybe?
Re: gyrocontroller
Hi nedr,
To turn the gyro off / on on the json configuration, you can look at my answer to this topic :
viewtopic.php?f=8&t=1188
To turn the gyro on / off with javascript, the answer is yes, you can do it with something like this :
This code is inspired by the GyroscopeButton plugin available here :
https://github.com/gopro/forgejs-plugin ... eButton.js
Hope this helps !
Have a nice day
To turn the gyro off / on on the json configuration, you can look at my answer to this topic :
viewtopic.php?f=8&t=1188
To turn the gyro on / off with javascript, the answer is yes, you can do it with something like this :
- //Get the gyroscope controller
- gyroscope = this.viewer.controllers.getByType(FORGE.ControllerType.GYROSCOPE);
- //Enable the gyro
- gyroscope.enabled = true;
- //Disable the gyro
- gyroscope.enabled = false;
This code is inspired by the GyroscopeButton plugin available here :
https://github.com/gopro/forgejs-plugin ... eButton.js
Hope this helps !
Have a nice day
- Raphaël
Who is online
Users browsing this forum: No registered users and 1 guest