I have working this one for the horizontal rotate, and works but i cant to do the vertical one rotation.
key model;integer tog=0;vector lookat; rotation Vec2RotHor( vector V ){ V = llVecNorm( V ); vector UP = < 0.0, 0.0, 1.0 >; vector LEFT = llVecNorm(UP%V); V = llVecNorm(LEFT%UP); return llAxes2Rot(V, LEFT, UP);} default{ touch (integer n) { llSetTimerEvent( 0.2 ); model = llDetectedKey(0); } timer() { lookat = llList2Vector( llGetObjectDetails( model, [OBJECT_POS]), 0 ); if ( lookat != ZERO_VECTOR ) { if ( !tog ) { llSetRot( Vec2RotHor( lookat - llGetPos())); } } }}