iOS PanoramaGL Hotspot not showing correctly

196 Views Asked by At

I'm using PanoramaGL to show a 360 picture inside a car and I need to add some hotspots.

I did exactly like their example:

UIImage *pano = [UIImage imageNamed:@"inside360_2048"];
NSObject<PLIPanorama> *panorama = [PLSphericalPanorama panorama];
[(PLSphericalPanorama *)panorama setImage:[PLImage imageWithCGImage:pano.CGImage]];

UIImage *hs = [UIImage imageNamed:@"dashboard_hotspot"];
PLTexture *hotspotTexture = [PLTexture textureWithImage:[PLImage imageWithCGImage:hs.CGImage]];
PLHotspot *hotspot = [PLHotspot hotspotWithId:1000 texture:hotspotTexture atv:0.0f ath:0.0f width:0.08f height:0.08f];
[panorama addHotspot:hotspot];

// Set panorama
[self.plView setPanorama:panorama];

The 360º image works perfectly, but the hotspot shows distorted like image below. It should be a green circle.

enter image description here

I don't have expertise with OpenGL, so I'm a little lost about what's going on and how to fix it.

Any idea or any other library that works?

1

There are 1 best solutions below

0
fcberg On

I gave up trying to use this library. Instead, I'm using Pannellum inside a web view. It works nicely.