Thanx, the problem is that I do not know how to interpolate neither vector nor matrix.
I'm trying but no joy.
- If I create a test object and
- if I calculate the direction vector to the target and
- the rotation matrix of the vector is then used for the the test object,
it works well - always pointing to my target.
But how to do do it incrementally? I do not know. This is the code:
// reset the testObject - which is flying in the world
testObject.clearTranslation();
testObject.clearRotation();
// returns a vector from the source position to the target pos.
SimpleVector dir=Chaser.getDirection(sourceObj, targetObj);
// set the directon to point to the target
testObject.setRotationMatrix(dir.getRotationMatrix());
// and put the testObject to the source to seeit
testObject.translate(sourceObj.getTranslation());
// and a liitle bit up
testObject.translate(0, 5,0);
Here I cannot attache pictures so I added them to my original thread related to the propject I'm working on:
http://www.jpct.net/forum2/index.php/topic,2592.msg19344.html#msg19344