#```sqf

1 messages · Page 1 of 1 (latest)

mellow crater
#

ima just create a thread here, im too tired to make any sense of this atm, i appreciate you helpin ill pick it back up in the morning

#

"the coordinates that you got yeah use those as setPos worldToModel (coordinates here) and vdirandup"

lean hemlock
#

ignore what i posted that was me testing model coordinate thingies

#
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
this setPos (_truck modelToWorld /*replace this with your coordinates*/);
this setVectorDirAndUp /*replace this with your vectordirandup coordinates*/;
[this, _truck] call BIS_fnc_attachToRelative;```
mellow crater
#

alright

#

thanks again, ima pick it back up in the morning and post the results here

lean hemlock
#

rgr

mellow crater
#

[-1.21997,-0.699878,-0.308341]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]

[-1.32996,-0.699879,-0.308341]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]

[-1.42993,-0.69988,-0.308342]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]

#

its working

#

oh nvm

#

only works when the truck is facing north

#

if the truck is turned it no longer follows it

#

alright, ive managed to find the code that works

#
private _truck = (getPos this) nearestObject "B_Truck_01_flatbed_F"; 
this setposasl (_truck modeltoworldworld [-1.21997,-0.699878,-0.308341]); 
this setVectorDirAndUp [ 
_truck vectorModelToworld [4.09273e-012,1,-2.79397e-009], 
_truck vectorModelToworld [1,4.09273e-012,-4.38325e-008] 
];
[this, _truck] call BIS_fnc_attachToRelative
#

this now allows me to attach it to the side with the right orientation

lean hemlock
#

sound

#

oh of course you couldnt use the vectordirandup from the relative one as its attachtorelative

#

pea brain kjw

mellow crater
#

damn, yeah like ive said im still very new to all this so im probably asking a ton of simple questions

lean hemlock
#

dont worry your code actually helped something im working on its just the game doesnt seem to like me