{"name":"getModelInfo","operator":null,"title":"getModelInfo","type":"command","url":"https://community.bistudio.com/wiki/getModelInfo","revid":352365,"updated":"2024-02-08T14:09:28Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.50"}],"since":{"game":"arma3","name":"Arma 3","version":"1.50"},"arma3_since":"1.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns object's model info. Model path is suitable for use with createSimpleObject command.","syntaxes":[{"syntax":"getModelInfo object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"}],"returns":{"type":"Array","types":["Array"],"description":"array in format [modelName, modelPath, hasSkeleton, placingPoint, mass] - modelName: String - For example \"car.p3d\" - modelPath: String - Full path to model. For example: \"a3\\data\\models\\car.p3d\" - hasSkeleton: Boolean - Returns whether the model has a skeleton (which usually means it's also animated) - Arma 3 v2.08 placingPoint: Vector3D - Placing point of the model in model coordinates. Placing point is always in format [0,0,z]. - Arma 3 v2.18 mass: Number - Mass defined in the p3d model","text":"Array - array in format [modelName, modelPath, hasSkeleton, placingPoint, mass]\n- modelName: String - For example \"car.p3d\"\n- modelPath: String - Full path to model. For example: \"a3\\data\\models\\car.p3d\"\n- hasSkeleton: Boolean - Returns whether the model has a skeleton (which usually means it's also animated)\n- Arma 3 v2.08 placingPoint: Vector3D - Placing point of the model in model coordinates. Placing point is always in format [0,0,z].\n- Arma 3 v2.18 mass: Number - Mass defined in the p3d model"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}}],"examples":[{"text":"```sqf\n_modelInfo = getModelInfo player; // [\"b_soldier_03.p3d\", \"a3\\characters_f\\blufor\\b_soldier_03.p3d\", true, [0,0,0]]\n```","code":["_modelInfo = getModelInfo player; // [\"b_soldier_03.p3d\", \"a3\\characters_f\\blufor\\b_soldier_03.p3d\", true, [0,0,0]]"]},{"text":"```sqf\n_modelInfo = getModelInfo cursorObject;\n```","code":["_modelInfo = getModelInfo cursorObject;"]},{"text":"Get Z ASL using placing point:\n\n```sqf\n_zASL = (heli modelToWorldWorld (getModelInfo heli select 3)) select 2;\n```","code":["_zASL = (heli modelToWorldWorld (getModelInfo heli select 3)) select 2;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["cursorObject","cursorTarget","createSimpleObject","getObjectType","getObjectTextures","objectParent","setVelocityTransformation","getUnitFreefallInfo","getEntityInfo","getMass"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.50","Scripting Commands"]}