【VR】Leap Motion 官网文档 MagneticPinch (磁性捏取)

前言:

至此LeapMotion的Unity部分翻译全部结束,同时也是本人的第十篇博客。纪念下这里程碑式的时刻(女友答应博客发到第十篇,头像换成合照~哈哈)。


MagneticPinch 磁性捏取


Attach this script to a RigidHand object to enable grabbing moveable Unity objects by pinching. The script uses a simple distance check and pulls the object to the hand (rather than simulating the physics of picking up an object by contact). You can specify the range and the strength of the force that moves the object to the hand.

将这个脚本添加到骨骼绑定的手对象上使其能够抓住Unity对象并移动。脚本用一个简单的距离检测并用手拖拽对象(而不是物理模拟通过接触来拾取一个对象)。你可以指定范围和力度以便将对象移到手上。


 

class MagneticPinch 磁性捏取类

Detects pinches and grabs the closest rigidbody if it’s within a given range.

Attach this script to the physics hand object assinged to the HandController in a scene.

检测给定范围内最近的刚体对其进行捏取和抓取。

将这个脚本添加到场景中手部控制器的物理手对象上。


Public Members 公共变量

float forceSpringConstant   float 弹性力常量

The stiffness of the spring force used to move the object toward the hand.

用于移动对象到手部的弹性力的强度。


float magnetDistance   float 吸取距离

The maximum range at which an object can be picked up.

对象能够被拾取的最大范围。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值