View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0009213||New Feature Requests||[All Projects] General||public||2016-04-08 01:31||2017-06-18 20:56|
|Summary||0009213: [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|
Or add it into attachElements
attachElements(from,to,x,y,z,xr,yr,zr,component -- False or nil if not.)
|Tags||No tags attached.|
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?
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.