diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/models/models_yaw_pitch_roll.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/models/models_yaw_pitch_roll.c b/examples/models/models_yaw_pitch_roll.c index 0931c00e..72529d89 100644 --- a/examples/models/models_yaw_pitch_roll.c +++ b/examples/models/models_yaw_pitch_roll.c @@ -92,6 +92,7 @@ int main(void) while (pitchOffset < -180) pitchOffset += 360; pitchOffset *= 10; + /* matrix transform done with multiplication to combine rotations Matrix transform = MatrixIdentity(); transform = MatrixMultiply(transform, MatrixRotateZ(DEG2RAD*roll)); @@ -99,8 +100,11 @@ int main(void) transform = MatrixMultiply(transform, MatrixRotateY(DEG2RAD*yaw)); model.transform = transform; - //---------------------------------------------------------------------------------- + */ + // matrix created from multiple axes at once + model.transform = MatrixRotateXYZ((Vector3){DEG2RAD*pitch,DEG2RAD*yaw,DEG2RAD*roll}); + //---------------------------------------------------------------------------------- // Draw //---------------------------------------------------------------------------------- BeginDrawing(); |
