I'm implementing a bone constraint for a racing game, to make the characters in the audience look in the direction of the leading car. I have it working in the character file (the character's head is following the empty target position) and when I lilbload/add the characters (and parent the targets to the car) the heads are correctly oriented. But as the game progresses, the bones never update, the characters heads stay in the same place as I move the target around...? And no error or warning in the console output...?
I made sure my target is correctly libloaded and parented to the real moving object (the car) with:
for people in logic.getCurrentScene().objects['People'].childrenRecursive: render.drawLine(people.worldPosition, target.worldPosition, [1,0,0])
And sure enough, a line is connecting each character to the moving object. The target works.
What I tried :
- An "always" sensor (w/ or w/o "pulse") to an "armature" actuator, running either "run armature" (?) or "set target" or both
- An "always" sensor (w/ or w/o "pulse") to a python module running
logic.getCurrentScene().objects.get('Armature').update()at every single tick
- Replace the "Damped Track" bone constraint with a "track to"
- Removing all animations in the character file in case a keyframe is preventing the bone from moving
But nope, the characters head do-not-move as I move (applyForce) the car. Is there something like applyConstraint that I must use?