Author Topic: Simple way to rotate entire skeleton permanently  (Read 14726 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Simple way to rotate entire skeleton permanently
« on: April 05, 2015, 10:30:39 am »
hi raft,

Is there any simple way to rotate the entire skeleton of an object permanently like rotateMesh() in jpct? I'm trying to map different coordination system from Blender to JPCT. Thanks.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Simple way to rotate entire skeleton permanently
« Reply #1 on: April 06, 2015, 12:31:43 am »
why do you want to rotate the skeleton? you can rotate the whole group via AnimatedGroup.getRoot().rotateXX(..) methods.

other than that, at the moment a rotation can only be applied to a skeleton and corresponding group during initial loding from Ogre3D or Collada files.

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Simple way to rotate entire skeleton permanently
« Reply #2 on: April 07, 2015, 04:52:45 pm »
Quote
why do you want to rotate the skeleton?
The reason I would need to rotate the skeleton is because of the exporter exports 3D object in different coordinate system. Therefore, there's a need to convert exported coordinate system to JPCT's as been raised in this post http://www.jpct.net/forum2/index.php/topic,2524.msg18503.html#msg18503

I actually tried getRoot().rotateXX() and it worked! I tot it would be the same with Animated3D.rotateXX() in which the pivot point is reset. It seems ok now, but still need to double confirm if all objects behave the same too.

Thanks alot~

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Simple way to rotate entire skeleton permanently
« Reply #3 on: April 07, 2015, 04:58:01 pm »
all objects will behave as the same, I cant see any reason for the opposite.

if this is a one time rotation, you can consider rotating your mesh and skeleton during initial loading. for example

Code: [Select]
jmeOgre2Bones -out group.bones -rotation x180 -in mesh.xml

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Simple way to rotate entire skeleton permanently
« Reply #4 on: April 08, 2015, 05:30:20 pm »
tat's exactly what I'm looking for! Never notice the script has that options.. It works great now. Thanks alot raft.