Smoothly moving an object Z rotation?
I'm using MoveObject, but it seems to not work.

pawn Код:
`stock Float:SetObjectFaceToPoint( objectid, Float:PointX, Float:PointY ){    new Float:eX, Float:eY, Float:eZ;    new Float:eAngle;    GetObjectPos(objectid, eX, eY, eZ);    if(eX > PointX && eY > PointY) eAngle = floatabs(atan2(floatsub(PointX, eX), floatsub(PointY, eY)));    if(eX > PointX && eY <= PointY) eAngle = floatadd(floatabs(atan2(floatsub(eY, PointY), floatsub(PointX, eX))), 270.0);    if(eX <= PointX && eY > PointY) eAngle = floatadd(floatabs(atan2(floatsub(PointY, eY), floatsub(eX, PointX))), 90.0);    if(eX <= PointX && eY <= PointY) eAngle = floatadd(floatabs(atan2(floatsub(eX, PointX), floatsub(eY, PointY))), 180.0);    //MoveObject( objectid, eX, eY, eZ, 2.0, -1000.0, 1000.0, eAngle );    SetObjectRot( objectid, 0, 0, eAngle );    return eAngle;}`
EDIT:it's the code not working, since SetObjectRot isn't working, anyone else got any function for this?

Willing to give reputation.

Forum Jump:

Users browsing this thread: 1 Guest(s)