Ralph neck looking at a model

I found a problem of making ralph model looking at a model but I solved it


My problem now is to make ralph head itself rotate correctly to the model using the lookAt()
I found a member who asked before about it


but no one get a final solution for it and also none of these solution suited me
anyone have another idea??

Making a particular joint of a model rotate to look at something is tricky, and may require the model having been created to make it possible (that is, without any unusual counter-rotations in the neck).

There is an example called “Looking and gripping” that illustrates rotating Eve’s neck so that her head follows the mouse.


Yeah…I studied this tutorial but it not used lookAt() function,it just used eveNeck.setH() and eveNeck.setP()
and this are not so accurate if the the character itself (eve) moves in different directions so the looking to the mouse will not be right
lookAt() is more accurate but only if you can adjust it in right way
any other ideas?

The answer I quoted in the linked thread may still apply; it refers to solving the problem of rotating the top of the head instead of the face.

As I’m not sure precisely which problem you’re having, I’m not sure how to provide more specific advice.


the problem is figuring out if ralph has the capability of turning his head in the first place

edit: sorry my mistake, ralph should have the capability to turn his head since he has a neck joint which allows him to bob his head up and down