Pico Neo 2 Shu (b) handle event management

Tip: Select the right side of the directory, you can quickly find what you need

This series of blog Address: Portal

 This section explains the contents:

  • What information we can get a handle of the control handle what to do (provide a script Pvr_ControllerAPI)
  • Provide a script that contains key press callback event (provided script Skode_PrvHandEvent)

 

 

First, the handle and the handle to obtain control information

SDK script contains not only the Pico Neo API 2, and the comments in English.

I will provide a new script, new script directly replace the lost original script. The old script or replace the contents inside a new script inside.

The new script Pvr_ControllerAPI what we need in the red box below.

How to use these methods?

Example: obtaining a handle power   Pvr_UnitySDKAPI.Controller. UPvr_GetControllerPower (int Hand)

1, the handle data

First we look at which events can be obtained, and these events what their trigger buttons / way

  • Handle power
  • Whether a key is pressed
  • Whether a key is lifted
  • Whether a key is being Press
  • Enter the value of the trigger
  • Angular acceleration of the handle
  • Linear acceleration of the handle

 

 

2, the state of a handle

Our most popular:

  • Vibration handle

 

 

3, the key handle API

We have to figure out, the corresponding button on the handle of the script which enumeration values. When otherwise want to get a handle key state, I do not know what parameters to pass.

   

 

 

Second, buttons Recall script

The script can be mounted to any object.

How to use: the code registered to the agent in the matter.

Published 320 original articles · won praise 77 · views 170 000 +

Guess you like

Origin blog.csdn.net/weixin_38239050/article/details/104656552