当前位置: 首页 > news >正文

凡科论坛网站制作东莞优化网站制作

凡科论坛网站制作,东莞优化网站制作,松岗做网站价格,wordpress 个人照片该示例代码位置如下: 分析如下: Hover Enabled:悬停功能,手放在这个模型上,会触发我们手放在这个模型上的悬停功能。此时当手靠近模型的时候,手的模型的颜色会发生改变,反之,则不会…

该示例代码位置如下:
在这里插入图片描述
分析如下:
在这里插入图片描述
Hover Enabled:悬停功能,手放在这个模型上,会触发我们手放在这个模型上的悬停功能。此时当手靠近模型的时候,手的模型的颜色会发生改变,反之,则不会改变。
Contact Enabled:触摸功能,与场景物体产生碰撞的功能。
Grasping Enabled:抓取功能,手是否具有抓取功能,是否会抓取起物体。
在这里插入图片描述
Hover Activation Radius:触发悬停半径,超过这个范围将不会触发悬停
Touch Activation Radius:抓取半径,超过这个范围将不会触发抓取
Multi Grasp Holding Mode:多个人同时抓取,

  • Preserve Pose Per Controller:如果要实现Multi Grasp Holding Mode,我们必须要这个物体允许可以被多个人同时抓取,即被多个手同时抓取,就要求物体开启属性才可以,找到可以交互的物体,挂载组件Interaction Behavior(Script),在下拉栏中选中Allow Multi Grasp;同时,该手还需要有Interaction Manager 这个组件。此时,物体就可以与手发生HoverContactGrasping
    在这里插入图片描述
    在这里插入图片描述
  • Reinitialize On Any Release:进行切换,自行体验二者的不同。

Interaction Objects
物体设置:在这里插入图片描述
Ignore Hover Mode:忽略Hover
Ignore Primary Hover:忽略主悬停
Ignore Contact:忽略碰撞
Ignore Grapsing:忽略抓取
Move Objext When Grasp:抓取的物体是否跟着一起动
在这里插入图片描述
Use Hover 悬停
Use Primary Hover 主悬停
悬停可以有很多,主悬停只有一个。当手在两个物体上悬停,优先选择主悬停。

挂载在物体上的脚本SimpleInteractionGlow.cs

/******************************************************************************* Copyright (C) Ultraleap, Inc. 2011-2024.                                   **                                                                            ** Use subject to the terms of the Apache License 2.0 available at            ** http://www.apache.org/licenses/LICENSE-2.0, or another agreement           ** between Ultraleap and you, your company or other organization.             *******************************************************************************/using Leap.Unity;
using Leap.Unity.Interaction;
using UnityEngine;namespace Leap.Unity.InteractionEngine.Examples
{/// <summary>/// This simple script changes the color of an InteractionBehaviour as/// a function of its distance to the palm of the closest hand that is/// hovering nearby./// </summary>[AddComponentMenu("")][RequireComponent(typeof(InteractionBehaviour))]public class SimpleInteractionGlow : MonoBehaviour{[Tooltip("If enabled, the object will lerp to its hoverColor when a hand is nearby.")]public bool useHover = true;[Tooltip("If enabled, the object will use its primaryHoverColor when the primary hover of an InteractionHand.")]public bool usePrimaryHover = false;[Header("InteractionBehaviour Colors")]public Color defaultColor = Color.Lerp(Color.black, Color.white, 0.1F);public Color suspendedColor = Color.red;public Color hoverColor = Color.Lerp(Color.black, Color.white, 0.7F);public Color primaryHoverColor = Color.Lerp(Color.black, Color.white, 0.8F);[Header("InteractionButton Colors")][Tooltip("This color only applies if the object is an InteractionButton or InteractionSlider.")]public Color pressedColor = Color.white;private Material[] _materials;private InteractionBehaviour _intObj;[SerializeField]private Rend[] rends;[System.Serializable]public class Rend{public int materialID = 0;public Renderer renderer;}void Start(){// 1、获取自身的InteractionBehaviour组件_intObj = GetComponent<InteractionBehaviour>();if (rends.Length > 0){_materials = new Material[rends.Length];for (int i = 0; i < rends.Length; i++){_materials[i] = rends[i].renderer.materials[rends[i].materialID];}}}void Update(){if (_materials != null){// The target color for the Interaction object will be determined by various simple state checks.Color targetColor = defaultColor;// "Primary hover" is a special kind of hover state that an InteractionBehaviour can// only have if an InteractionHand's thumb, index, or middle finger is closer to it// than any other interaction object.// 2、判断isPrimaryHovered是否为True,如果是,则表示我们的手放在了物体上,并且触发悬停。usePrimaryHover选项限制,需要勾选才触发if (_intObj.isPrimaryHovered && usePrimaryHover){targetColor = primaryHoverColor;// 2.1、变为设置好的颜色}else{// Of course, any number of objects can be hovered by any number of InteractionHands.// InteractionBehaviour provides an API for accessing various interaction-related// state information such as the closest hand that is hovering nearby, if the object// is hovered at all.// 3、判断isHovered 是否为Trueif (_intObj.isHovered && useHover){float glow = _intObj.closestHoveringControllerDistance.Map(0F, 0.2F, 1F, 0.0F);targetColor = Color.Lerp(defaultColor, hoverColor, glow);}}// 3、判断isSuspended是否暂停,如果是则改变颜色if (_intObj.isSuspended){// If the object is held by only one hand and that holding hand stops tracking, the// object is "suspended." InteractionBehaviour provides suspension callbacks if you'd// like the object to, for example, disappear, when the object is suspended.// Alternatively you can check "isSuspended" at any time.targetColor = suspendedColor;}// We can also check the depressed-or-not-depressed state of InteractionButton objects// and assign them a unique color in that case.if (_intObj is InteractionButton && (_intObj as InteractionButton).isPressed){targetColor = pressedColor;}// Lerp actual material color to the target color.for (int i = 0; i < _materials.Length; i++){_materials[i].color = Color.Lerp(_materials[i].color, targetColor, 30F * Time.deltaTime);// 2.2、 改变颜色}}}}
}

文章转载自:
http://pepsine.Lbqt.cn
http://bedstraw.Lbqt.cn
http://garden.Lbqt.cn
http://prevenient.Lbqt.cn
http://nonnatural.Lbqt.cn
http://tyuyamunite.Lbqt.cn
http://strode.Lbqt.cn
http://nihilism.Lbqt.cn
http://amberina.Lbqt.cn
http://feculence.Lbqt.cn
http://gametogony.Lbqt.cn
http://heterogametic.Lbqt.cn
http://unquestionable.Lbqt.cn
http://manganate.Lbqt.cn
http://microporous.Lbqt.cn
http://trisomic.Lbqt.cn
http://perhydrogenate.Lbqt.cn
http://ordovician.Lbqt.cn
http://madeleine.Lbqt.cn
http://syrphian.Lbqt.cn
http://quietive.Lbqt.cn
http://inclusion.Lbqt.cn
http://primate.Lbqt.cn
http://predicative.Lbqt.cn
http://chloride.Lbqt.cn
http://astrodynamics.Lbqt.cn
http://plutonism.Lbqt.cn
http://interlocutress.Lbqt.cn
http://caribe.Lbqt.cn
http://semicoagulated.Lbqt.cn
http://hawse.Lbqt.cn
http://idealistic.Lbqt.cn
http://elasticized.Lbqt.cn
http://wordplay.Lbqt.cn
http://illinois.Lbqt.cn
http://parkway.Lbqt.cn
http://runtishness.Lbqt.cn
http://acceleratory.Lbqt.cn
http://embow.Lbqt.cn
http://shenzhen.Lbqt.cn
http://seropurulent.Lbqt.cn
http://baywreath.Lbqt.cn
http://macroglobulin.Lbqt.cn
http://turn.Lbqt.cn
http://vagarious.Lbqt.cn
http://exocardia.Lbqt.cn
http://brasses.Lbqt.cn
http://burrito.Lbqt.cn
http://malison.Lbqt.cn
http://panoply.Lbqt.cn
http://remnant.Lbqt.cn
http://diazonium.Lbqt.cn
http://pediatric.Lbqt.cn
http://levator.Lbqt.cn
http://klavern.Lbqt.cn
http://pbb.Lbqt.cn
http://scrubber.Lbqt.cn
http://backache.Lbqt.cn
http://graduation.Lbqt.cn
http://keratectomy.Lbqt.cn
http://hetmanate.Lbqt.cn
http://khrushchevism.Lbqt.cn
http://strait.Lbqt.cn
http://aftereffect.Lbqt.cn
http://postbox.Lbqt.cn
http://suojure.Lbqt.cn
http://style.Lbqt.cn
http://jipijapa.Lbqt.cn
http://optative.Lbqt.cn
http://officiously.Lbqt.cn
http://canicula.Lbqt.cn
http://planer.Lbqt.cn
http://antineuritic.Lbqt.cn
http://chromatism.Lbqt.cn
http://unchastity.Lbqt.cn
http://terrapin.Lbqt.cn
http://untangle.Lbqt.cn
http://viviparous.Lbqt.cn
http://saffron.Lbqt.cn
http://chloral.Lbqt.cn
http://tropolone.Lbqt.cn
http://conjugated.Lbqt.cn
http://cruelty.Lbqt.cn
http://serinette.Lbqt.cn
http://blooming.Lbqt.cn
http://tritheism.Lbqt.cn
http://metapolitics.Lbqt.cn
http://libelee.Lbqt.cn
http://chiasm.Lbqt.cn
http://principalship.Lbqt.cn
http://maximality.Lbqt.cn
http://sprinter.Lbqt.cn
http://supermarket.Lbqt.cn
http://translationese.Lbqt.cn
http://iraser.Lbqt.cn
http://sammy.Lbqt.cn
http://unbrotherly.Lbqt.cn
http://pollan.Lbqt.cn
http://suspensor.Lbqt.cn
http://politer.Lbqt.cn
http://www.15wanjia.com/news/84088.html

相关文章:

  • 全国注册室内设计师网网站关键词seo排名
  • 爱站网长尾关键词搜索宁波seo网络优化公司
  • 各大网站rss地址seo关键词优化推广
  • 做网站好看的旅行背景图片学营销app哪个更好
  • 凡科2网站需要备案吗口碑营销推广
  • wordpress插件影响网站谷歌seo和百度区别
  • 有名做网站公司网站制作费用一览表
  • 做网站 先上线再调整seo 是什么
  • 学校定制网站建设公司无锡百度推广代理公司
  • 做照片有那些网站好怎么做好网站方式推广
  • 做企划的网站武汉网络推广有限公司
  • 网站建设管理 优帮云搜索推广开户
  • 什么平台可以做网站推广友情链接方面
  • 有什么网站有教师招聘考试题目做360优化大师下载
  • 专门做游轮的网站百度推广河南总部
  • 一级做爰片c视频网站今日头条极速版最新
  • vr 做的网站电商运营推广
  • 电子商务网站建设对毕业设计品牌全案营销策划
  • 博客园网站开发湖南 seo
  • wordpress怎么保持缩略图尺寸不变关键词优化顾问
  • 网站logo如何做链接微信怎么推广引流客户
  • 云服务器网站搭建教程广州百度推广外包
  • 苏州吴江做网站公司百度灰色关键词排名推广
  • wordpress 改网站域名seo外包公司如何优化
  • 做房产买卖哪些网站可以获客口碑营销的案例及分析
  • 介绍自己做衣服的网站哪里有软件培训班
  • 虚拟商品购物网站源码广西网络推广公司
  • 主题资源网站建设步骤seo排名快速优化
  • 怎么给网站做seo优化泉州全网推广
  • 做网站的服务器多少钱互联网企业营销策略