Hello,
I'm trying to use PhysicsCharacterNode on a imported model that has animation.
Everything works fine when using the model as a PhysicsNode (static or dynamic), but not with the PhysicsCharacterNode.
Something very strange is happening to the world rotation of the animation bones during the physics update, and by strange, I mean something that I'm pretty sure should not be happening.
The WorldTranslation and WorldRotation of the bones mysteriously changes after the second physics space update, while their LocalTranslation does not. This results in the world location of the mountpoint (a bone) being wrong, which is no good as it's need …as a mountpoint :(
Here's the result after a few s.o.p lines:
PhysicsSpace.update()
PhysicsGhostNode - setWorldTranslation: (0.0, 0.99, 0.0)
PhysicsGhostNode - setWorldRotation: [x=0.0 y=0.0 z=0.0 w=0.5]
Mountpoint: [x=-1.4901161E-7 y=-0.99999887 z=-5.811453E-7 w=-6.2584877E-7] [x=0.49089 y=0.553379 z=0.446544 w=0.503386]
Mountpoint parent: [x=0.44654325 y=-0.5033847 z=-0.49088922 w=-0.5533788] [x=0.018487 y=-0.015465 z=-0.001465 w=0.999708]
Mountpoint parent: [x=0.46349767 y=-0.50337523 z=-0.49395728 w=-0.53645843] [x=0.048764 y=-0.727602 z=0.045756 w=0.682732]
PhysicsSpace.update()
PhysicsGhostNode - setWorldTranslation: (0.0, 0.98, 0.0)
PhysicsGhostNode - setWorldRotation: [x=0.0 y=0.0 z=0.0 w=0.5]
Mountpoint: [x=-7.4505806E-8 y=-0.49999943 z=-2.9057264E-7 w=-3.1292439E-7] [x=0.49089 y=0.553379 z=0.446544 w=0.503386]
Mountpoint parent: [x=0.22327162 y=-0.25169235 z=-0.24544461 w=-0.2766894] [x=0.018487 y=-0.015465 z=-0.001465 w=0.999708]
Mountpoint parent: [x=0.23174883 y=-0.25168762 z=-0.24697864 w=-0.26822922] [x=0.048764 y=-0.727602 z=0.045756 w=0.682732]
(The rotations and translations remain constant after the second update())
The mountpoint's WorldRotation and LocalRotation is below that
The mountpoint's immendiate parent is outputted (there are a few of them)
The good news is that I've narrowed down the problem to either with jbullet-jme, jbullet, bullet or the way I'm using the jbullet-jme API.
If you know the solution to this problem I would appreciate some pointers, as it is: I'm rather stuck :?