AttachObjectToObject - Offset Values
#1

I'm working on an object system. I want to group two objects: object A and object B. I want the result to be after attaching that they both stay at their same positions until I decide to move/rotate the parent object, which means I have to get the right offset values for position/rotation from the parent's position. I've tried to do so by substracting parent from child and other tricks but nothing worked as expected. I was hoping somebody could point me in the right direction. Thank you in advance.

pawn Код:
AttachDynamicObjectToObject(object_id, target_id, target_pos[0] - object_pos[0], target_pos[1] - object_pos[1], target_pos[2] - object_pos[2], target_rot[0]-object_rot[0],target_rot[1]-object_rot[1],target_rot[2]-object_rot[2],1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)