SA-MP Forums Archive
Bug o error? AttachObjectToObject. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Bug o error? AttachObjectToObject. (/showthread.php?tid=424491)



Bug o error? AttachObjectToObject. - adri1 - 22.03.2013

Код:
AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1)
Bueno, ъltimamente he estado usando esta funciуn para algunos de mis filterscripts.
Encontrй un problema o error...

Cuando la rotaciуn Y de attachtoid (objeto base), es de 90.0000 o -90.0000, a la hora de atar el objeto, йste no se coloca donde se debe de colocar:

Rot Y attachtoid= 0.0000 (No bug)
Код:
AttachObjectToObject(objectid, attachtoid, X, Y, Z, RX, RY, RZ.... )
Pero, en cambio si la rotaciуn Y de attachtoid es 90.0000 o -90.0000, sucede esto:
Los valores X, Z y Y, X, se invierten, igual con la rotaciуn:

Lo normal serнa:
Код:
AttachObjectToObject(objectid, attachtoid, X, Y, Z, RX, RY, RZ.... )
Pero se debe colocar asн (para que se coloque donde se desea):
Код:
AttachObjectToObject(objectid, attachtoid, Z, X, Y, RZ, RX, RY.... )
No vi ninguna nota en SA-MP Wiki, en la que haya que invertir valores.

Tener en cuenta que para obtener los offsets (o las diferencias), se resta:

objectid X - X attachtoid
objectid Y - Y attachtoid
objectid Z - Z attachtoid

Saludos, y gracias.

EDIT: Solucionado