I can come up with questions everyday, here is todays…
Looking through the examples files i didnt find anything that addressed this specifically…
What are the methods to have an animated characters head look at something. Or have an aimed gun stay aimed where the mouse is point in a 2.5d type game? Basically doing a post constrain or rotate on specific bones of a character.
Along those lines, what about the possibility of inverse kinematics for ground and feet placement?
Thanks again for putting up with my constant stream of “what about” I’m enjoying everything about the engine so far.
Having these things asked can be useful to others and they’re good questions.
CharacterDemo (.cpp here) uses an AnimatedModel, and manually controls a bone and its corresponding Node:
// Set the head bone for manual control
object->GetSkeleton().GetBone("Bip01_Head")->animated_ = false;
...
// Turn head to camera pitch, but limit to avoid unnatural animation
Node* headNode = characterNode->GetChild("Bip01_Head", true);
You could use Node::LookAt(const Vector3 &target, const Vector3 &up=Vector3::UP, TransformSpace space=TS_WORLD)
in your scene update event.
Physics system’s RigidBody also has kinematic mode (which I haven’t used), a few types of constraint, and is used to transform nodes. urho3d.github.io/documentation/a00031.html