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
Hi I was facing the issues when implementing gyroscope in ipad. Its showing "No
Gyroscope".
I was using this code when i need to start the gyroscope in panorama view or
stop it.
-(void)startCompass
{
[plView setAccelerometerSensitivity:1];
[plView startSensorialRotation];
}
-(void)stopCompass
{
[plView stopSensorialRotation];
}
but it did not work , so little trick work for me. whenever you want to start
compass , just add a dummy hotspot and keep its visibility hidden. so this work
nice for me.
The working code is
-(void)startCompass
{
[plView setAccelerometerSensitivity:1];
[plView startSensorialRotation];
NSString *iconPath = [[NSBundle mainBundle] pathForResource:@"hotspot1" ofType:@"png"];
PLTexture *hotspotTexture = [PLTexture textureWithImage:[PLImage imageWithPath:iconPath]];
PLHotspot *hotspot = [PLHotspot hotspotWithId:0 texture:hotspotTexture atv:0 ath:0 width:0.01 height:0.01];
[currentPanoramaObject addHotspot:hotspot];
// hotspot.panoramaImageId = dto.destPanoImgId;
//hotspot.type = PLHotspotTypeNavigation;
hotspot.alpha = 0;
[plView.panorama addHotspot:hotspot];
}
i kept the width and height small and make it hidden. because its for dummy
purpose.
Original issue reported on code.google.com by
[email protected]
on 22 Aug 2013 at 4:30The text was updated successfully, but these errors were encountered: