강의

멘토링

커뮤니티

Inflearn Community Q&A

traceimp's profile image
traceimp

asked

Unity Game Development (Unity 2D) - From Start to Deployment

Various Functions - 6

손에서 발사되는 화살

Written on

·

406

0

너무 늦은듯하지만 다른분들께 도움이 될까 싶어 남깁니다.

 

혹시 화살날리기 하고 싶은 분들은 아래 코드를 참조하시면 됩니다.

 

저는 처음 위치값을 설정해주고, 복제 -> 날리기로 진행했습니다.

 

arrowObj.transform.position = shootPosTf.position;  // 화살이 날아갈 시작 위치

Instantiate(arrowObj).GetComponent().AddForce(Vector3.left * 300f);    // 날아가는 화살 설정

unity

Answer

This question is waiting for answers
Be the first to answer!
traceimp's profile image
traceimp

asked

Ask a question