View Issue Details

IDProjectCategoryView StatusLast Update
0009213New Feature RequestsGeneralpublic2017-06-18 20:56
Reportercodylewiz Assigned To 
Status newResolutionopen 
Summary0009213: [Request] Attach object to vehicle component

Title explains it all, allowing you to attach objects to vehicle components, allowing for more in-depth customization of your vehicle. I know it is possible using attachElements but unless a timer is used, or onclientRender is used to pull the position of said part of vehicle every frame, and set the elements position accordingly there's no way to make it accurately stay with the vehicle 'Hood' 'trunk' 'doors' 'wheels' etc.

Steps To Reproduce


Additional Information

AttachElementToVehicleComponent(element,vehicle,component name,x,y,z,xr,yr,zr)

Or add it into attachElements

attachElements(from,to,x,y,z,xr,yr,zr,component -- False or nil if not.)

TagsNo tags attached.



2016-05-16 12:27

viewer   ~~0024692

This is possible by using the onClientPreRender event, getVehicleComponentPosition and, if you need to, getVehicleComponentRotation. As you can see, it's not a difficult thing to script, if you have a minimum math knowledge. What advantage would a hardcoded function give over a scriptable approach?


2016-05-16 12:34

reporter   ~~0024693

I use the same approach with render+ setElementAttachedOffsets (vehicle component positions are the correct values for offsets) so it's not a big deal imho.

Issue History

Date Modified Username Field Change