DoTween外掛程式物體晃動

2021-08-23 12:04:14 字數 514 閱讀 9944

在網上有很多關於dotween外掛程式的移動旋轉等介紹

以下是外掛程式上的引用

public static tweener doshakerotation(this transform target, float duration, vector3 strength, int vibrato = 10, float randomness = 90, bool fadeout = true);

以下**是物體旋轉晃動bool fadeout預設是true

如果需要物體一直晃動就需要使用false,

transform.doshakerotation(1f, new vector3(10, 10, 10), 10, 180, false).setloops(-1, looptype.incremental);

transform.doshakeposition(1f, new vector3(10, 10, 10), 10, 180, false).setloops(-1, looptype.incremental);

Dotween外掛程式的使用

一 移動方法!1 前往世界座標某個位置 3秒到達 transform.domove new vector3 4,3,0 3 剛才我做了乙個測試,就是不管你cube的位置在 是誰的子物體,我設的世界座標就是你還是乙個父物體的時候會到達的位置。2 本地座標上移動 transform.dolocalmov...

DOTween外掛程式常用點歸納

1.與transform相關的物件移動,旋轉,縮放 position transform.domove 終點座標,時長 單向移動transform.domovex transform.domovey transform.domovez transform.dolocalmove 終點座標,時長 do...

DoTween 動畫外掛程式簡單示例

1 dotween的靜態方法 dotween.to maskimage.color,tocolor maskimage.color tocolor,new color 0,0,0,0 2f 詳細分解 dotween.to maskimage.color 我們想改變的物件值 tocolor 每次dot...