LeroY Posted June 5, 2018 Share Posted June 5, 2018 How to get size of vehicle? Start_x, End_x and sum dist and height? Get position components or ... ? Link to comment
Moderators IIYAMA Posted June 5, 2018 Moderators Share Posted June 5, 2018 (edited) @LeroY https://wiki.multitheftauto.com/wiki/GetElementBoundingBox Bounding box. Please read the information carefully. Edited June 5, 2018 by IIYAMA Link to comment
ShayF2 Posted June 6, 2018 Share Posted June 6, 2018 (edited) function getVehicleSize(vehicle) if vehicle and isElement(vehicle) and getElementType(vehicle) == 'vehicle' then local minX,minY,minZ,maxX,maxY,maxZ = getElementBoundingBox(vehicle) return maxX-minX,maxY-minY,maxZ-minZ end end This returns the length, width, and height of the vehicle. Since it is 3d, you have 3 things to worry about. Edited June 6, 2018 by ShayF Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now