Last active
July 1, 2024 15:38
-
-
Save hotohoto/1d37ce63bb3c3a0d7e37447c96ffdf9c to your computer and use it in GitHub Desktop.
Revisions
-
hotohoto revised this gist
May 11, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # blender rotate in the right hand direction figher = bpy.context.scene.objects['airplane'] figher.location = (0, 0, 0) figher.rotation_euler = (0, 0, 0) -
hotohoto revised this gist
May 11, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import mathutils import math # blender rotate in the right hand direction figher = bpy.context.scene.objects['fighter'] figher.location = (0, 0, 0) -
hotohoto revised this gist
May 11, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,4 +15,4 @@ matrix_pitch = mathutils.Matrix.Rotation(pitch, 4, 'Y') matrix_roll = mathutils.Matrix.Rotation(roll, 4, 'X') figher.rotation_euler = (matrix_yaw @ matrix_pitch @ matrix_roll).to_euler() -
hotohoto created this gist
May 11, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ import bpy import mathutils import math figher = bpy.context.scene.objects['fighter'] figher.location = (0, 0, 0) figher.rotation_euler = (0, 0, 0) yaw = math.radians(190) pitch = - math.radians(-50) roll = math.radians(10) matrix_yaw = mathutils.Matrix.Rotation(yaw, 4, 'Z') matrix_pitch = mathutils.Matrix.Rotation(pitch, 4, 'Y') matrix_roll = mathutils.Matrix.Rotation(roll, 4, 'X') figher.matrix_world = matrix_yaw @ matrix_pitch @ matrix_roll