|
Rowd, Newbie
Posted: 21 January 2012 09:10 PM Total Posts: 3
I’ve loaded an md5 mesh and animations, but when I use the moveForward() methods, it moves the object on the local Z axis, which is what I want. My problem is that the model is facing the wrong way by 90 degrees. How do I rotate the 90 degrees and reset the local axis so they match up? I understand I can do this by just taking into account the 90 degrees in the code, but I don’t want to have to continue to do that with my models.
Thanks :D
Rowd
|
Vice, Member
Posted: 18 March 2012 07:10 PM Total Posts: 58
[ # 1 ]
i’ve the same problem. and using preFab to import and export doesn’t help - because the models already have the wrong orientation.
|
Matse, Sr. Member
Posted: 18 March 2012 07:44 PM Total Posts: 149
[ # 2 ]
I deal with this using an ObjectContainer3D : add the mesh as a child of the container and rotate it the way you want it. Then do all rotations and movements on the container, use the mesh to play animations but don’t move or rotate it and you’re fine.
|
Vice, Member
Posted: 18 March 2012 09:08 PM Total Posts: 58
[ # 3 ]
Great. Thank you very much, Matse! It works fine.
But do you know why the mesh has this behavior? it not only on 3ds meshes, obj etc. will always have a wrong orientation or rotated about an angle of 180 (x-axis e.g.).
|
Fabrice Closier, Administrator
Posted: 18 March 2012 10:14 PM Total Posts: 1265
[ # 4 ]
using preFab to import and export doesn’t help - because the models already have the wrong orientation.
—> in Prefab 1.x, rotate and press the applyRotations btn, then export
|
Fabrice Closier, Administrator
Posted: 18 March 2012 10:18 PM Total Posts: 1265
[ # 5 ]
@vice Why it is rotated: it depends of your editor(or its prefs). You have now a right handed to left handed coordinate system issue and the Yup expected by Prefab/Away is not the same as in your editor.
Problem is that there are no standard regarding coordinate systems in 3D land.
|
Vice, Member
Posted: 18 March 2012 10:59 PM Total Posts: 58
[ # 6 ]
@Fabrice, thanks for your explanation.
i try to exporting a 3ds in obj format with prefab. the orientation is after loading in away3D not the same. so i must rotate the mesh to get the orientation shown in prefab. thats why i’m wondering.
|