-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotspot feature #7
Comments
Is it possible to add hot spots (eg. arrows) for chaning sphere texture? |
Hotspot support would be great. |
thanks guys! if I'm reading correctly, you are talking about hotspot on the screen, not hotspot in the 3D environment, correct? the latter, which is much harder, i'm working on right now, maybe finish inside of a month. RE screen hotspot: consider PanoramaView as a kind of a UIImageView class, one could add a UIButton on top of it in the view hierarchy, and it intercepts touches just fine. So you can do all this in ViewController without touching PanoramaView. Here's what i just tried in ViewDidLoad right after float buttonSize = 88.0f;
UIButton *hotspot = [[UIButton alloc] initWithFrame:CGRectMake(self.view.bounds.size.width*.5-buttonSize*.5, self.view.bounds.size.height-buttonSize, buttonSize, buttonSize)];
[hotspot addTarget:self action:@selector(changeImage:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:hotspot]; and then added this function below: -(void) changeImage:(UIButton*)sender{
NSLog(@"change Image");
[panoramaView setTexture:@"newImage.png"];
} Does this work in the context of your code? |
Hi @robbykraft, thanks for your answer (and for the great code of course). I was talking about hotspots in the 3d env. - but cool to hear your are working on it. I can imagine the it's not that simple - thinking of touch detection and trigger actions. |
Grate work @robbykraft , unfortunately my english is very bad :P |
hi all, check the latest commit, the touchVector is calculated as it should. how does this suffice for hotspots? |
Hi @robbykraft ...thanks again for your work. Talking of hotspots for me the first question is how to add touchable hotsport views in the environment, the second one how to trigger actions (wich i guess can be done via the commits you have done). |
thanks for the reply! that makes sense. lemme know if this function helps out: |
Hello robbykraft thank you so much for this! works great in my app. I'm trying to get hotspots to work. Not sure if anyone was able to get it working. Pretty much added a button and when the button is pressed depending on the coordinates set should change the view inside the image. Any idea? |
hello @phantomlight
This adds a button into the world. This is the function that people are calling a "hotspot". It moves with the panorama. Adding a UIKit UIButton will not move around with the world, but sit in the same location on the screen. Can you clarify again what you're trying to accomplish? |
Thanks for your great code. It would be great if it has hotspot feature 👍
The text was updated successfully, but these errors were encountered: