Rotating a Child Spatial (within the character control)

Howdy monkeys! Soo, basically what I’m attempting to do is rotate the character to “compensate” for acceleration (ala wolfire style). Now, I have a node which I attach the character control to and then I attach the Sinbad spatial to node, and as many of you know, the BetterCharacterControl uses the node’s rotation to handle view direction and such, so I can’t really mess with that (otherwise everything is wicked glitchy).

Anyways, I have the code for rotation and such, which works really well (it rotates my test objects the way I want it to perfectly). In fact, the way I have it set up (rotating the Sinbad spatial every update) works perfectly too… That is, until I change the ViewDirection of the character control… Then, because I do all the calculations and stuff with the local rotation (world rotation doesn’t quite work the way I’m doing things…), it doesn’t compensate for the rotations of the parent node; so it still rotates along the axis that it thinks it’s supposed to be rotating on, but it’s not the one that it should be XDD

Hopefully screenshots can explain it better than I can…
running forward without changing ViewDirection:

running forward with changing the ViewDirection:

note that the axis of rotation stays the same in each one (it’s the same one trust me XD sorry for everyone who doesn’t know the map):

My code for rotation (for anyone who’s trying to accomplish the same task; it works perfectly fine when not in a parent-child problem like I am >.<):
[java]Vector3f vv = getVelocity().cross(getLocalUp());
Quaternion q = new Quaternion();
q.fromAngleAxis(getVelocity().length()angleLimitingConstant, vv);
final Quaternion j = new Quaternion();
j.slerp(q, tpf

So, really what I need help with here is a way to rotate the model the way I need it to without having to rewrite the entirety of BetterCharacterControl… I mean it works perfectly with rotating the rigid body but then the rigid body doesn’t rotate the character node?? (also the whole “onGround” check goes totes whack XD but I feel that would be easier to solve if only the darn control rotated its spatial like it’s supposed to… I probably buggered up somewhere or something idk)… Any suggestions? Thanks!

My suggestion is that its easier to work with directions than with rotations.

Hey Normen, thanks for the reply! The problem wasn’t actually with the rotations, but the node layering :wink: anyways, I fixed it!! (I have the model copy the location and rotation of the character node, not having it actually be a child… works perfectly!!)

Anyways, video of the final result :wink: (sorry for the low quality, I just wanted to quickly record something…)
[video]- YouTube