Software Archive
Read-only legacy content
17061 Discussions

unity5 Realsense tracked and chose a hand

康夫_上_
Beginner
278 Views

Good evening.

Using the Intel realsense and unity5, application development is being performed.
As follows, I'd like to make a program of an animation of Uniform Resource Locator, but could you tell me.
https://software.intel.com/sites/campaigns/realsense-winners/details.html?id=18

00:14~

The image which transfers a cursor to Sean who tracked and chose a hand.
I should be very much obliged if you can tell, thank you.

0 Kudos
1 Reply
MartyG
Honored Contributor III
278 Views

To others reading this: I think Uniform Resource Locator refers to 'URL' (i/e a web address).

To 康夫 上., I am not sure what video you were looking at, as the link that you provided was broken.  I looked for a video with the identification number '18' like on your link.  I think you want an image on the screen to be highlighted when the user's hand moves over it.

There is a way to add a script to objects that puts an outline around them.  to do this, select your object and go to the Component menu at the top of the Unity window.  Select the UI option from this menu and then the Effects option, then Outline.  Like shown in the image below.

ui.jpg

This places a script called 'Outline' in your object.

ui2.jpg

What I would do to make what you want to do work is this: remove the tick mark from the script so that the outline does not appear on the object when the program starts.  Then set the collider field of the object to have 'IsTrigger' activated.

ui3.jpg

Finally, put a script with an OnTriggerStay function in it that will send an activation instruction to the 'Outline' script inside the same object to turn on the outline effect when the cursor is moved over the object.

 A script with the OnTriggerStay function will run for all of the time that your cursor is inside the collider field.  When the cursor goes outside the object, it is no longer 'staying' inside the collider and the OnTriggerStay script will stop sending activation signals to the 'Outline' script.  This should make the outline around the object disappear because your cursor has moved away from the object's collider field.

If this method does not work for you, it is possible to change the entire color of the object instead of just its border.  This is easier than changing the outline and I could tell you how to do this.

I hope some of this helps you.

Japanese

これを読んで他の人に:私は、ユニフォームリソースロケータは、「URL」(I / EAのWebアドレス)を指すと思います。

上康夫するには、私はあなたが壊れていた提供されたリンクのように、見ていたものを、ビデオを確認していません。私はあなたのリンクのような識別番号「18」の映像を探しました。私はあなたがユーザの手がその上を移動したとき、画面上の画像をハイライト表示さ​​せたいと思います。

彼らの周りのアウトラインを置くオブジェクトにスクリプトを追加する方法があります。これを行うには、あなたのオブジェクトを選択し、ユニティウィンドウの上部にあるコンポーネントのメニューに進みます。このメニューからUIオプション、次にエフェクトのオプションを選択して、[アウトライン。次の図に示すような。

これはオブジェクト内の「概要」というスクリプトを配置します。

プログラムの起動時に輪郭がオブジェクトに表示されないように、スクリプトからチェックマークを削除します。私はあなたが仕事をしたいものを作ることだろうことはこれです。そして、「IsTrigger 'が有効化しているために、オブジェクトのコライダーのフィールドを設定します。

最後に、カーソルがオブジェクトの上に移動したときにアウトライン効果をオンにするために、同じオブジェクト内に「概要」スクリプトに起動指示を送信することでOnTriggerStay機能にスクリプトを置きます。

 OnTriggerStay機能を持つスクリプトは、カーソルがコライダーフィールド内にあるすべての時間のために実行されます。カーソルがオブジェクトの外側になると、それはコライダーとOnTriggerStayスクリプトは「概要」スクリプトに活性化信号の送信を停止します内側に「滞在」はなくなりました。これは、カーソルがオブジェクトのコライダーフィールドから離れて移動しているため、オブジェクトの周囲の輪郭が消える行う必要があります。

この方法は、あなたのために動作しない場合は、オブジェクト全体の色だけではなく、その境界線を変更することが可能です。これは、アウトラインを変更するよりも簡単であり、私はこれを行うにはどのように言うことができます。

私はこれのいくつかはあなたを助け願っています。

0 Kudos
Reply