Leap Motion basic development learning path (3)

Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right.


Preface

Hand post-processing P12

一、Hand Post-processes

The speed, inertia and resistance of hands in VR scene

2. Replace the hand model

Import model resources and replace p14-15 in turn

3. Interactive components

The Interaction Manager component is for interaction management. There are two parts under the component, script: Interaction Hand

Whether to hover (the ball will change color)

physical interaction

grab collision

settings: trigger radius of hover, color transition

 

 

There is a component similar to a switch, like a remote control car or the like

In the multi-person grabbing mode at the same time, the object needs to be mounted with the interaction behavior component. If multiple people are allowed to grab the object, both hands can grab the same object, and there will be a sense of suspension.

If it is not allowed, you can hold it with the left and right hands, and it will automatically release if you hold it with the left hand and the right hand.

 Turn on main hover

SimpleInteractionGlow This simple script changes the color of an interaction as a function of its distance from the nearest palm.
Hover nearby.

Use a Boolean value to determine whether we use the main hover to modify the color.

There can only be one Use Primary Hover (the object we want to grab). There can be many Hover (many objects we can touch).

At the same time, the SimpleInteractionGlow script also allows us to test the hand status, such as whether it is grabbing, etc.

 _intObj.OnGraspStay += () =>
    {
        Debug.Log("grasping");
    };

Create your own interactive scene P22

If you can’t remember, review it as a whole on p22 at station b.

Basic UI

 If you don’t use VR, delete it.

If you want to use VR, enter two coordinates in projectsetting, corresponding to the names in the error report.

 

Same reason:

Amplitude of movement and spring force p25

P43 dynamic UI

 

 

Summarize

InteractionEngine-Examples (interaction scene examples)

Reset lighting: window-Rendering-lighting settings-regenerate

To grab by hand, you need to mount the Interaction Behavior component.

Guess you like

Origin blog.csdn.net/qq_43801336/article/details/123296822