- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
English:
Hello!
I think that what you are asking is: can you change a scene when you use the camera to move a pointer over a UI element and touch it?
Yes you can change a scene like this. :)
How I did this in my own project is to make an object (a finger) and move the finger object forward so that it touched a UI element on a screen. Here is an episode from our development diary series that shows how we made and programmed this.
http://sambiglyon.org/?q=node/1264
This system could also be used to change the scene or activate the animation, by putting the script for the scene change or animation inside the UI element that you are touching.
For example, here is a JavaScript script that changes the scene.
function OnTriggerEnter () {
Application.LoadLevel ("PUT NAME OF YOUR SCENE FILE HERE");
}
The OnTriggerEnter type of function means that when your pointer object enters a collider field surrounding the UI element object, the script inside that element will be automatically activated. So if the scene change script is inside, touching the UI element with the pointer object will make the scene change.
I would be happy to answer any other questions you have. Good luck!
Japanese:
こんにちは!
あなたは、UI要素の上にポインタを移動し、それに触れてカメラを使用するときにシーンを変更することができます。私は何を求めていることであると思いますか?
はい、あなたはこのような場面を変更することができます。 :)
私は自分のプロジェクトでこれをやったどのオブジェクト(指)を作り、それが画面上のUI要素に触れたように、前方の指のオブジェクトを移動することです。ここでは、作られ、これをプログラムする方法を示して我々の開発日記シリーズのエピソードです。
http://sambiglyon.org/?q=node/1264
このシステムはまた、シーンを変更したり、あなたが接触しているUI要素内のシーン変化やアニメーションのスクリプトを置くことによって、アニメーションを活性化するために使用することができます。
例えば、ここでシーンを変更するJavaScriptのスクリプトです。
function OnTriggerEnter () {
Application.LoadLevel ("ここにあなたのシーンファイルの名前");
}
関数のOnTriggerEnter型はポインタオブジェクトがUI要素オブジェクトを囲むコライダーフィールドに入ったとき、その要素内のスクリプトが自動的に起動されることを意味します。シーンチェンジスクリプトが内側であれば、ポインタオブジェクトとUI要素をタッチすると、シーンチェンジを行います。
私はあなたが持っている他の質問に答えて幸せです。幸運!
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page