[Include] Rotations.inc
#21

rotations v2

I rewrote the include because they were to many different function which did similar things, so I combined them into CombineRotation, ConvertRotation, GetRotation, ReverseRotation, RotatePoint, SetRotation. All the subfunction like ConvertXToY are still available but with changed functionnames and syntax

One new thing is probably the bunch of AttachXToYEx based on the natives AttachXToY but the Ex functions do so without the need for offsets or rotations, so they only take (X, Y) as parameter. The victim X gets attached to Y as both were in global space.
The second new thing are some function for dynamic objects, so there is GetDynamicObjectPosRot which gets the position and rotation at the same time, nothing special? except that it also get the global position and rotation of attached objects, also works with attached objects attached to objects ... attached to other object, vehicle or player. The second function which uses the just mentioned one is DetachDynamicObject which destroys the attached object and recreates it at the last position.

Download for the old version, new version and complete reference is in the updated first post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)