{"hash":"0xD45BB89B53FC0CFD","ns":"ENTITY","name":"_SET_ENTITY_ROTATION_PARALLEL_TO_LINE","slug":"_SET_ENTITY_ROTATION_PARALLEL_TO_LINE","official":false,"named":true,"luaName":"SetEntityRotationParallelToLine","game":"rdr3","apiset":"client","returnType":"void","params":[{"name":"entity","type":"Entity"},{"name":"x1","type":"float"},{"name":"y1","type":"float"},{"name":"z1","type":"float"},{"name":"x2","type":"float"},{"name":"y2","type":"float"},{"name":"z2","type":"float"},{"name":"p7","type":"int"}],"summary":"Sets the entity rotation so it is parallel to the direction defined by two world coordinates, without moving the entity.","descriptions":[{"source":"alloc8or","format":"text","body":"Sets the entity rotation so it is parallel to the direction defined by two world coordinates, without moving the entity.\nThis does not make the entity face either coordinate directly; it aligns the entity with the line direction between the two points. Observed usage passes p7 = 1."},{"source":"vorp","format":"text","body":"Sets the entity's rotation so that it becomes parallel to the direction defined by the line between coords1 and coords2, without moving the entity from its current position.\n\nThis native does NOT make the entity face coords1 or coords2. Instead, it keeps the entity at its current world position and adjusts its orientation so that it is aligned parallel to the direction derived from the two coordinates"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/ENTITY/_SET_ENTITY_ROTATION_PARALLEL_TO_LINE","markdownUrl":"https://natives.borderlinerp.com/natives/ENTITY/_SET_ENTITY_ROTATION_PARALLEL_TO_LINE.md","snippets":{"lua":"SetEntityRotationParallelToLine(entity, x1, y1, z1, x2, y2, z2, p7)","luaInvoke":"Citizen.InvokeNative(0xD45BB89B53FC0CFD, entity, x1, y1, z1, x2, y2, z2, p7)","js":"SetEntityRotationParallelToLine(entity, x1, y1, z1, x2, y2, z2, p7);","jsInvoke":"Citizen.invokeNative('0xD45BB89B53FC0CFD', entity, x1 + 0.0000001, y1 + 0.0000001, z1 + 0.0000001, x2 + 0.0000001, y2 + 0.0000001, z2 + 0.0000001, p7);","csharp":"Function.Call((Hash)0xD45BB89B53FC0CFD, entity, x1, y1, z1, x2, y2, z2, p7);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","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."]}}