pad=get_control(player_handle)*59/60.0; //プレイヤーの操作情報を取得
if (pad.pitch>0) { //ピッチアップの場合
set_animation(player_handle, "anime4_r_10o_Layer4",
"AnimationSet_001", pad.pitch, "", 0, 1.0); //左エレベータ
set_animation(player_handle, "anime5_r_10o_Layer5",
"AnimationSet_001", pad.pitch, "", 0, 1.0); //右エレベータ
} else { // ピッチダウンの場合
set_animation(player_handle, "anime4_r_10o_Layer4",
"AnimationSet_002", -pad.pitch, "", 0, 1.0); //左エレベータ
set_animation(player_handle, "anime5_r_10o_Layer5",
"AnimationSet_002", -pad.pitch, "", 0, 1.0); //右エレベータ
}
if (pad.roll>0) { // 右ロールの場合
set_animation(player_handle, "anime2_r_10o_Layer2",
"AnimationSet_002", pad.roll, "", 0, 1.0); //左エルロン
set_animation(player_handle, "anime3_r_10o_Layer3",
"AnimationSet_001", pad.roll, "", 0, 1.0); //右エルロン
} else { // 左ロールの場合
set_animation(player_handle, "anime2_r_10o_Layer2",
"AnimationSet_001", -pad.roll, "", 0, 1.0); //左エルロン
set_animation(player_handle, "anime3_r_10o_Layer3",
"AnimationSet_002", -pad.roll, "", 0, 1.0); //右エルロン
}
if (pad.yaw>0) { // 右ヨーの場合
set_animation(player_handle, "anime6_r_10o_Layer6",
"AnimationSet_003", pad.yaw, "", 0, 1.0); //中ラダー
} else { // 左ヨーの場合
set_animation(player_handle, "anime6_r_10o_Layer6",
"AnimationSet_004", -pad.yaw, "", 0, 1.0); //中ラダー
}
|