![]() Play Automatically If enabled, your tween will start as soon as your script component is triggered, which by default is when the lens starts.Tween Name If you want to use a Tween Chain (more on that later) or trigger your tween from a script (also more on that later), you will need to specify a name for the tween.You'll probably be leaving this blank most of the time, but if you ever need/want to place your tween script elsewhere, you can use this field to tell Lens Studio which object should be affected. Scene Object If you don't specify this, the tween will act upon whatever object the script component is attached to.This section is not very exciting, but it's good to run through our various options before we start adding tween scripts. TweenChain lets you run multiple tween scripts either in sequence or all at once.TweenValue will transition between two numbers and is great for scripts, material properties, and VFX properties.TweenAlpha is good for fading objects in and out.TweenColor is for transitioning a material's color.TweenScreenTransform is similar to TweenTransform but geared towards two dimensional objects (like Screen Images).TweenTransform is for moving, rotating, or scaling objects.The tween type you use will depend entirely on what you want to do. Lens Studio gives us a few different tween types to use in our lenses. You don't need to do anything else, simply move it to the top of your scene hierarchy. Each tween script you add to your lens relies on the TweenManager, so before any of those can run the TweenManager needs to be running. When a lens starts up, Lens Studio (or Snapchat when it is running on your phone) will start at the top and run down through everything. Then, and this is important, click and drag the TweenManager all the way to the top of your object list. Expand the TweenManager object and delete the examples. You'll also notice a bunch of objects and text added to your scene. We do this through the Objects Panel and can find the Tween Manager either by searching or by finding the Helper Scripts section.ĭepending on what you have selected in your scene, the Tween Manager may be added at the top level or nested under another object. All you need to do is configure a few settings and you are good to go! Adding the tween manager scriptīefore we can start using the tween script, we need to import the Tween Manager. Now don't be intimidated by the word "script" - you don't need to write any code to use the tween script. If you need to animate anything inside Lens Studio - position, rotation, scale, opacity, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |