recently i wanted to create “true” player body with simulated real torso/head movement.
i currently dont have idea how to easly solve this, but i belive some of you might know nice math solution.
what i have:
getNodeAttatchment of HeadBone
add new node with some translation(front of head) to 1) point node
attach camera to CameraNode inside 2) point node
(so camera rotate exactly like head)
Problem:
When headBone parent like neck or upper torso are rotated in below/up direction, then when i rotate head it will not rotate maintaining up Vector. up Vector is different based on parent elements.
Question:
How to fix up direction for headBone in this situation?
(please note i cant use lookAt with UNIT_Y vector because it will disallow looking up/below with head) Also it would be nice to not have UNIT_Y “instant” up vector, but make tpf affect and change it.
im really tired of this math so any help really appreciated.
here is video to make you more understand the problem:
I would suggest leaving the camera in world space and just manually moving it to the spot of the head bone, then rotating it as you want. CameraNode is overrated.
anyway thanks to your suggestion i managed to make ugly solution for this. i am unable to partially update it by tpf (but maybe will find way) anyway it works.
camera is in armatureNode, position is updated to have related position to armatureNode and used lookAt to manage it.
Yeah I had that problem with the stuttering myself a handful of times, still not entirely sure what solved it in the end, but I think it had something to do with moving the camera in the simpleRender method after everything else. So you can try that to see if it’s any better I suppose.
a thread issue is solved, but if someone will maybe know why below video issue appear, it would be nice.
when there is white screen, trully character is in position NaN,NaN,NaN (issue)
i will try solve this later, so if someone know earlier, please tell. myself i belive that character is thrown? or something. but NaN values are very odd… its a betterCharacterControl
Try setting it to a fixed timestep with no smoothing. (I don’t know if that’s possible in JME’s bullet app state stuff.)
In my SiO2 bullet integration, sometimes my position would go NaN when using native bullet and I traced it down to teeny-tiny catch-up frames in the ‘smoothing’ logic. I could not track it down in the native code and have opted for fixed time steps and no smoothing in the mean time.