ಠ_ಠ
@anonymous
偷偷說
Thu, Oct 15, 2020 3:15 PM
Thu, Oct 15, 2020 3:16 PM
1
不好意思打擾大家 有沒有會 C # 的旅人
想問一個unity的 c # 的問題
pl型態是Tramsfom
後面不能.position
應該要怎麼寫呢?
查了很久都寫錯 感謝大家
unity
程式
cherry5968
Thu, Oct 15, 2020 3:20 PM
噗主能用電腦直接截圖嗎
cherry5968
Thu, Oct 15, 2020 3:25 PM
主要是手機翻拍要看一些.,.,:;有點麻煩
雖然我想放大可是還是不清楚
knight3292
Thu, Oct 15, 2020 3:25 PM
你官方手冊查過了沒?這是unity的type,去unity查,版本不同也有差異
knight3292
Thu, Oct 15, 2020 3:29 PM
Position的x, y, z是get property
你要直接把position設成新的Verctor3
venus9378
Thu, Oct 15, 2020 3:37 PM
因為不直覺新手容易踩到的坑之一
var newPos = pl.position;
newPos.x = (略;
pl.position = newPos;
要整個Vector3複製出來,修改數值再寫進去
ಠ_ಠ
Thu, Oct 15, 2020 3:46 PM
已經可以了!感謝以上所有的旅人
不好意思動作比較慢 也謝謝旅人的建議
載入新的回覆
想問一個unity的 c # 的問題
pl型態是Tramsfom
後面不能.position
應該要怎麼寫呢?
查了很久都寫錯 感謝大家
unity 程式
雖然我想放大可是還是不清楚
你要直接把position設成新的Verctor3
var newPos = pl.position;
newPos.x = (略;
pl.position = newPos;
要整個Vector3複製出來,修改數值再寫進去
不好意思動作比較慢 也謝謝旅人的建議