{"hash":"0x66F9EB44342BB4C5","ns":"IK","name":"_INVERSE_KINEMATICS_REQUEST_LOOK_AT","slug":"_INVERSE_KINEMATICS_REQUEST_LOOK_AT","official":false,"named":true,"luaName":"InverseKinematicsRequestLookAt","game":"rdr3","apiset":"client","returnType":"void","params":[{"name":"ped","type":"Ped"},{"name":"args","type":"Any*"}],"summary":"Requests a look-at IK action for the ped using a script arg struct.","descriptions":[{"source":"alloc8or","format":"text","body":"Requests a look-at IK action for the ped using a script arg struct.\n\nargs:\nstruct IkRequestLookAtArgs\n{\n\talignas(8) float  x;\n\talignas(8) float  y;\n\talignas(8) float  z;\n\talignas(8) Entity targetEntity;\n\talignas(8) int    targetBone;    // often 21030 (head) or -1\n\talignas(8) int    flags;         // bitfield\n\talignas(8) int    p6;\n\talignas(8) int    durationMs;    // often 500\n\talignas(8) int    p8;\n\talignas(8) int    p9;\n\talignas(8) int    p10;\n\talignas(8) int    p11;\n\talignas(8) int    p12;\n\talignas(8) int    p13;\n\talignas(8) int    p14;\n\talignas(8) int    p15;\n\talignas(8) int    p16;\n\talignas(8) int    p17;\n\talignas(8) int    p18;\n\talignas(8) int    p19;\n\talignas(8) int    p20;\n\talignas(8) int    p21;\n\talignas(8) int    p22;\n};\n\nstatic_assert(sizeof(IkRequestLookAtArgs) == 0xB8, \"incorrect IkRequestLookAtArgs size\");\n\nNotes:\n- Scripts use this both for entity look-at and world-position/offset look-at.\n- Common observed fields: targetEntity, targetBone, durationMs, plus mode/priority-like fields p8 and p17..p22.\n- If ped == 0 while a task sequence is active, the native queues an internal look-at IK task into the current sequence instead of applying immediately.\n- Pairs naturally with _INVERSE_KINEMATICS_IS_ACTIVE / _INVERSE_KINEMATICS_SET_DISABLED_FOR_PED."}],"examples":[],"aliases":[],"enums":["eAnimBoneTag"],"related":[],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/IK/_INVERSE_KINEMATICS_REQUEST_LOOK_AT","markdownUrl":"https://natives.borderlinerp.com/natives/IK/_INVERSE_KINEMATICS_REQUEST_LOOK_AT.md","snippets":{"lua":"local args = InverseKinematicsRequestLookAt(ped, args)","luaInvoke":"local args = Citizen.InvokeNative(0x66F9EB44342BB4C5, ped, Citizen.PointerValueIntInitialized(args))","js":"const args = InverseKinematicsRequestLookAt(ped, args);","jsInvoke":"const args = Citizen.invokeNative('0x66F9EB44342BB4C5', ped, Citizen.pointerValueIntInitialized(args));","csharp":"var args = new OutputArgument();\nFunction.Call((Hash)0x66F9EB44342BB4C5, ped, args);\n// args.GetResult<int>()","notes":["The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.","`Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}