Use touch input to rotate sphere


#1

Hi, I’ve build a simple 360 experience that works either by rotating the phone or by going into the headset mode…

Now I’m trying to add another functionality where a user could swipe the screen to rotate the photosphere (like 360 youtube videos)…

Not sure how to go about it? any code example or tuts on this?

thx

Marc.


#2

I was just going to ask if we could play 360 youtube videos in the photosphere. There are some cool ones out there that I can add 3d parts to.

Steve


#3

Hey Guys,

@mpoirier - The photosphere object fires the same pointer events as a plane so using the pointermove event is a good place to start in order to get the movement of the user’s finger on the sphere. How you then rotate the sphere is up to you, unfortunately, we don’t have any code examples or tutorials on this specific behavior at this point in time.

@stevesanerd - I’ve created a template for 360 video that we’ll look to add to Studio in future, but you can find it here in the meantime (360videoplayer.zpp (610.3 KB)). It won’t, however, work with YouTube URLs as it uses the video player subsymbol as a base. You will need to host the video file directly.

Thanks,
Mark


#4

Thank you Mark!
One question, Can I add the video to it instead of streaming it? I’m looking at a small looking background.

Steve


#5

We highly recommend streaming for 360 videos due to the resolution needed to get the video looking good quality, often 1920 width is the bare minimum and even then higher resolutions are preferred. If you use embedded MP4 for this then the initial scan download could take a while on anything but the fastest internet connections.

You can just as easily get it working with embedded MP4 however, simply add a photosphere to an attitude orient node and set the material of the photosphere to your video.

Thanks,
Mark


#6

Can you tell me how to actually play the video material applied to a photosphere?