FreeOffset Posted June 6, 2015 Share Posted June 6, 2015 Reversing this mod: https://www.gta5-mods.com/scripts/hydraulics I see it checks VEHICLE::IS_VEHICLE_ON_ALL_WHEELS and then calls ENTITY::APPLY_FORCE_TO_ENTITY, anyone know how it applys a force to just one axle or the front of the car? Link to comment Share on other sites More sharing options...
Jitnaught Posted June 6, 2015 Share Posted June 6, 2015 Reversing this mod: https://www.gta5-mods.com/scripts/hydraulics I see it checks VEHICLE::IS_VEHICLE_ON_ALL_WHEELS and then calls ENTITY::APPLY_FORCE_TO_ENTITY, anyone know how it applys a force to just one axle or the front of the car? It just changes the rotation of the applied force. -Creator of the Hydraulics mod Link to comment Share on other sites More sharing options...
FreeOffset Posted June 6, 2015 Author Share Posted June 6, 2015 Reversing this mod: https://www.gta5-mods.com/scripts/hydraulics I see it checks VEHICLE::IS_VEHICLE_ON_ALL_WHEELS and then calls ENTITY::APPLY_FORCE_TO_ENTITY, anyone know how it applys a force to just one axle or the front of the car? It just changes the rotation of the applied force. -Creator of the Hydraulics mod Thanks! Got the front wheels only working with ENTITY::APPLY_FORCE_TO_ENTITY(Vehicle, 0, 0, 0, 30, 0, 30, 0, 0, 1, 1, 1, 0, 1); Link to comment Share on other sites More sharing options...
Fireboyd78 Posted June 6, 2015 Share Posted June 6, 2015 (edited) I just figured out some natives that might actually help you! int _GET_ENTITY_BONE_INDEX(Entity entity, char *boneName) // 0xFB71170B7E76ACBA 0xE4ECAC22Vector3 _GET_ENTITY_BONE_COORDS(Entity entity, int boneIndex) // 0x44A8FCB8ED227738 0x7C6339DF Pseduo-code example: coords[0] = ENTITY::_GET_ENTITY_BONE_COORDS(vehicle, ENTITY::_GET_ENTITY_BONE_INDEX(v_8, "wheel_lf"));coords[1] = ENTITY::_GET_ENTITY_BONE_COORDS(vehicle, ENTITY::_GET_ENTITY_BONE_INDEX(v_8, "wheel_lr"));coords[2] = ENTITY::_GET_ENTITY_BONE_COORDS(vehicle, ENTITY::_GET_ENTITY_BONE_INDEX(v_8, "wheel_rf"));coords[3] = ENTITY::_GET_ENTITY_BONE_COORDS(vehicle, ENTITY::_GET_ENTITY_BONE_INDEX(v_8, "wheel_rr"));I believe these return world coords, so you'll probably have to make them local offsets or something. If the bone doesn't exist, the bone index will be -1. Hope this helps! Edited June 6, 2015 by Fireboyd78 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