julionib Posted June 9, 2015 Share Posted June 9, 2015 The title says all, how to obtain entity (ped/object/vehicle) mass? For vehicle it may be possible to identify in the handling.meta but for objects things change i believe. So, there is a method for that? Thx in advance Link to comment Share on other sites More sharing options...
Mgel Posted June 9, 2015 Share Posted June 9, 2015 (edited) As far as i can tell, no such method exists. However, both void SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) and void SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier) do exist. In addition to this you could probably play around with the gravity levels using: void SET_VEHICLE_GRAVITY(Vehicle vehicle, BOOL Toggle) void SET_PED_GRAVITY(Ped ped, Any gravity) void SET_GRAVITY_LEVEL(float level) I would also think that it might be possible to calculate the mass yourself, or at least some approximate, using: void GET_MODEL_DIMENSIONS(Hash modelHash, Vector3 *minimum, Vector3 *maximum) if you can find the density of the object in question. You could also calculate the mass, using: float GET_VEHICLE_ACCELERATION(Any p0) If you can find the force applied to the vehicle. Edited June 9, 2015 by Mgel Quazaka 1 Link to comment Share on other sites More sharing options...
julionib Posted June 10, 2015 Author Share Posted June 10, 2015 thx man, but i would like to obtain the mass value, the density multipliers are related to entity spawn. Link to comment Share on other sites More sharing options...
lpgunit Posted June 10, 2015 Share Posted June 10, 2015 I know it's a bit off-topic, but could this account for why vehicles tumble when you don't change the handling line? Link to comment Share on other sites More sharing options...
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