일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 김양재
- node.js
- 주일설교
- MongoDB
- 김양재 목사
- Machine Learning
- nodeJS
- Big Data
- 확률
- No SQL
- Artificial Intelligence
- 김양재 목사님
- probability
- data science
- 우리들교회
- 딥러닝
- 통계
- R
- c++
- 데이터 과학
- openCV
- 인공지능
- 빅 데이터
- WebGL
- 빅 데이타
- Deep learning
- 몽고디비
- 빅데이타
- 빅데이터
- Statistics
Archives
- Today
- Total
Scientific Computing & Data Science
Script for an Object Touched on Mobile Devices 본문
CG & Video Games/Unity 3D
Script for an Object Touched on Mobile Devices
cinema4dr12 2013. 5. 26. 12:21using UnityEngine;
using System.Collections;
public class ObjectTouched : MonoBehaviour {
public GUIText myText;
private Ray myRay = new Ray();
RaycastHit myHit = new RaycastHit();
// Use this for initialization
void Start () {
myText.text = "";
}
// Update is called once per frame
void Update () {
if(Input.touchCount > 0)
{
if(Input.GetTouch(0).phase.Equals(TouchPhase.Began))
{
myRay = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
if (Physics.Raycast(myRay, out myHit, 100.0f))
{
myText.text = myHit.collider.name.ToString();
}
}
}
}
}
'CG & Video Games > Unity 3D' 카테고리의 다른 글
Loading PNG Sequence (0) | 2013.05.26 |
---|---|
How to Play Animation Sequence in Unity (0) | 2013.05.26 |
Script for an Object Clicked - an Alternative Method (0) | 2013.05.26 |
Script for an Object Clicked (0) | 2013.05.26 |
Script for Mobile Touch Scree (0) | 2013.05.26 |
Comments