"VR" Leap Motion Official document Magneticpinch (magnetic pinch)

Source: Internet
Author: User

Preface


At this point, the translation of LeapMotion's unity body is all over, and this is the tenth blog of the partner.

To commemorate this milestone, the two-dimensional pier is now converted into a group photo * ^-^ *


Link to original translation: http://blog.csdn.net/qq_18408937/article/details/47452343


Magnetic pinch classes are an effective way to respond to somatosensory input, and in order to enhance the user experience, it is often more important to make the operation easier than to make the operation more realistic.


MagneticpinchMagnetic Pinch

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.

Add this script to the bone-bound hand object so that it can grab the Unity object and move it. The script uses a simple distance detection and drags the object with a hand (rather than physically simulating the pick up of an object through contact). You can specify the range and the force to move the object to the hand.

class Magneticpinch Magnetic Pinch-Pick class

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.

Detects the nearest rigid body in a given range to pinch and crawl it.

Add this script to the physical hand object of the hand controller in the scene.


Public Variables

float forcespringconstant Float Elastic Force constant

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

The strength of the elastic force used to move the hand of the object.


float magnetdistance float suction distance

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

The maximum range of objects that can be picked up.


————————————————————————————————————————————


For more information:

"VR" Leap Motion Official Document Script reference (directory)


(Copyright notice: This is a translation of the Leap Motion website document, all rights reserved by the Leap Motion website, and the text content is for learning only.) )



"VR" Leap Motion Official document Magneticpinch (magnetic pinch)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.