遊戲設計社
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[筆記] 移動/旋轉 物件

向下

[筆記] 移動/旋轉 物件 Empty [筆記] 移動/旋轉 物件

發表  aaa1218bbb 周日 11月 27, 2011 10:26 am

所謂的瞬間就是指馬上到指定位置,不會慢慢地移過去..

瞬間移動物件 :

代碼:
transform.position = new Vector3(5,0,0);

瞬間旋轉物件 :

代碼:
transform.Rotate(5, 0, 0);


更多資訊可以參考 :

移動 : http://unity3d.com/support/documentation/ScriptReference/Transform-position.html

旋轉 : http://unity3d.com/support/documentation/ScriptReference/Transform.Rotate.html

aaa1218bbb
aaa1218bbb
社員
社員

文章數 : 65
積分 : 4747
注冊日期 : 2011-11-22

https://design.666forum.com

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章