AirBnB sponsored lens

  • 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 

    Comment actions Permalink
  • 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!!

    Comment actions Permalink
  • 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

    //@input SceneObject  t //a DeviceTracking influenced object
    //@input SceneObject influenced //the group of objects OUT of the DeviceTracking one

    var updateEvent = script.createEvent("UpdateEvent");
    updateEvent.bind(update);

    function update(){
      var worldForward = vec3.forward();
      var TrackingForward = script.t.getTransform().forward;
      var forward = new vec3(
        0.7 * worldForward.x + 0.3 * TrackingForward.x,
        0.7 * worldForward.y + 0.3 * TrackingForward.y,
        0.7 * worldForward.z + 0.3 * TrackingForward.z
      );

      // Normalize the vector
      forward = forward.normalize();

      // Create new rotation using the vector
      var rot = quat.lookAt(forward, vec3.up());

      script.influenced.getTransform().setWorldRotation(rot);
    }
    Comment actions Permalink
  • 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

    Comment actions Permalink
Have a comment?

Please sign in to leave a comment.

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!