www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: jaychang0917 on April 01, 2017, 11:38:22 am

Title: how to rotate a model base on euler angle (pitch, yaw, roll)?
Post by: jaychang0917 on April 01, 2017, 11:38:22 am
Is there any method that i can rotate a model by euler angles (pitch, yaw, roll)?
Thanks!
Title: Re: how to rotate a model base on euler angle (pitch, yaw, roll)?
Post by: jaychang0917 on April 02, 2017, 09:14:23 am
I tried with the following code, it works.

Code: [Select]
model.clearRotation();
model.rotateX((float) Math.toRadians(pitch));
model.rotateY((float) Math.toRadians(yaw));
model.rotateZ((float) Math.toRadians(roll));
Title: Re: how to rotate a model base on euler angle (pitch, yaw, roll)?
Post by: AeroShark333 on April 02, 2017, 11:03:46 am
I think pretty much everything in jpct works with radians rather than degrees... :P