Code (csharp):
-
// -------------------- Kalkulationen Salto vorwärts abblocken / Calculations Block salto forward -----------------------------------------------------
-
-
// Variable divesalto
-
// sturzflug salto vorwärts blocken || dive salto forward blocking
-
if (rotationx < 90 ) divesalto =rotationx / 100.0; //Updown
-
if (rotationx > 90 ) divesalto =- 0.2; //Updown
-
-
//Variable diveblocker
-
// Blockt seitlichenTaumelflug beim Sturzflug || blocks sideways stagger flight while dive
-
if (rotationx < 90 ) diveblocker =rotationx / 200.0;
-
else diveblocker = 0;
-
-
//----------------------------Alles zurückdrehen / everything rotate back ---------------------------------------------------------------------------------
-
-
// Zurückrotieren wenn Key in die andere Richtung zeigt | rotateback when key wrong direction
-
-
//Zurückdrehen Z Achse generell. Limitiert auf Horizontal Button ist nicht gedrückt
-
//Rotate back in z axis general, limited by no horizontal button pressed
-
}
-
-
//Zurückdrehen X Achse || Rotate back X axis
-
}
-
本文介绍了一个使用C#在Unity3D中实现游戏角色翻滚动作的代码实例。主要内容包括翻滚动作的计算、方向调整及角色旋转等关键步骤。
1882

被折叠的 条评论
为什么被折叠?



