분류 전체보기
-
06FEB19_GameObject.Find()C#/Unity 2019. 2. 7. 23:07
GameObject.Find() : 하이어라키뷰의 오브젝트를 찾는다. 같은 이름의 오브젝트가 여러 개인 경우, 맨 처음 발견되는 오브젝트를 구한다. 리턴형: GameObject transform.Find(): 자신의 자식(Child) 오브젝트를 찾는다. 자식만 찾을 수 있으며, 손자, 증손자 등 계층구조가 깊은 경우에는 그 경로를 지정한다. 리턴 형(type)은 Transform이다. ex) transform.find("Turret/Cannon/spPoint"); "Turret"이라는 같은 이름의 오브젝트가 여러개인 경우에는 transform.Find("Turret").gameObject 로 찾는다.
-
unity billiardC#/Unity 2019. 1. 20. 20:37
designed simple billiard table objects based on real size. At first time, I considered scale unit as meter. So the table size was 2.72*1.5 width. First problem I had was that the ball didn't bounce off from the wall of the table and stuck. As a solution I tried to applying physics material as well as OnCollisionEnter with following codes in order to enforce the ball to bounce off. void Bump(Coll..