AirBnB sponsored lens
Hey forum and knowledgeable people,
I have 2 questions.
I recently got served a sponsored lens from airbnb where they had basically 4 or 5 different 360 environments you could click through but you were stopped from turning around all the way around, basically you could only see 180 (or maybe a little less than 180) of the full 360 panorama. I assume they did this to save memory but I still found it incredibly effective.
See the link here to see what I mean.
How do you get the camera to stop moving/prevent the user from turning around?
Second and an easier question, how do you program a lens to be able to click through multiple environments like the did in the airbnb lens? I would like to be able have users click and move to new 360 or 180 environment exactly like how they did it.
Thanks in advance.
Hi Colin,
For the first question, this type of 360 experience uses the Device Tracking Component with Rotation as the Tracking Mode. Once you add the tracking component to your camera, the camera's transform will reflect the device's rotation. You can limit the rotation angle by setting the camera transform itself.
For the second question, you can write a script to toggle the textures on your 360 dome on tap. Alternatively, you can also use Behavior Script to set the texture on tap.
Let me know if you have more questions!
Best,
Risa
Hi risa,
Can you elaborate how I can limit the FOV using the tracking rotation as the tracking mode? What do you mean by "You can limit the rotation angle by setting the camera transform itself."
I was able to get the behavior script to work to switch environments.
THANK YOU!!
I couldn't figure out how to constraint AirBnB-style (rotation values from the DeviceTracking transform gave weird numbers on Y world rotation so I couldn't use that to know if I turned too far, specifically it went from 2PI to 4.7 radians & back up without ever reaching 0)
So what I did, for those it may help, is put my objects in a group (anything that should be seen rotating but not 360°), and I used a weighted value between world's forward direction (= no rotation at all) & the forward of the DeviceTracking transformed reference (too much rotation).
So here is an example of how I used 30% of the rotation given by DeviceTracking
In the end I find this to be a smoother way to prevent the user to look around too much than just stopping the view movement abruptly like the AirBnb one did
Hey Colin,
Please take a look at this thread that might help you to achieve the effect that you looking for:
https://support.lensstudio.com/hc/en-us/community/posts/360042933051-Confine-portal-lens-experience?page=1#community_comment_360005280491
Best,
Amir