As the title states, the AddLocalEntityInteraction export doesn't take into account the bone. In the code itself it seems like there isn't a mention in the export for the bone argument, so this probably applies to all local entity interactions.
Expected behavior:
- When using
AddLocalEntityInteraction it should create the interaction point on the vehicle on the correct bone.
Actual behavior:
- Doesn't show an interaction point at all on the specified bone.
Recreation:
- Create a resource with the following client lua file:
local interact = exports.interact
local offset = vector3(0,0,0)
local bone = 'boot'
local useEntityInteraction = true
---@param entity integer
local function createInteractions(entity)
if useEntityInteraction then
print(("Creating interaction with %i via AddEntityInteraction"):format(entity))
local netId = NetworkGetNetworkIdFromEntity(entity)
-- Below always shows up as long as entity is valid.
interact:AddEntityInteraction({
netId = netId,
name = 'ent_interaction',
id = 'ent_interaction',
distance = 8.0,
interactDst = 1.0,
ignoreLos = true,
offset = offset,
bone = bone,
options = {
{
label = "Chop Trunk (Networked Entity)",
action = function (entity, coords, args)
print("chop chop")
end
}
}
})
else
print(("Creating interaction with %i via AddLocalEntityInteraction"):format(entity))
-- Below doesn't show up at all.
interact:AddLocalEntityInteraction({
entity = entity,
name = 'localent_interaction',
id = 'localent_interaction',
distance = 8.0,
interactDst = 1.0,
ignoreLos = true,
offset = offset,
bone = bone,
options = {
{
label = "Chop Trunk (Local Entity)",
action = function (entity, coords, args)
print("chop chop")
end
}
}
})
end
end
CreateThread(function ()
local playerPed = PlayerPedId()
local vehicle = GetVehiclePedIsIn(playerPed, false)
if DoesEntityExist(vehicle) then
createInteractions(vehicle)
end
end)
- Spawn a vehicle that has the
boot bone.
- Sit in the vehicle and run the resource with the
useEntityInteraction boolean set to true. This will create an interaction point on the current vehicle that shows when you get out of the vehicle.
- While sitting in the vehicle still, run the resource with the
useEntityInteraction boolean set to false. This does create an interaction point (no error while creating) but doesn't seem to actually show at all.
As the title states, the
AddLocalEntityInteractionexport doesn't take into account the bone. In the code itself it seems like there isn't a mention in the export for the bone argument, so this probably applies to all local entity interactions.Expected behavior:
AddLocalEntityInteractionit should create the interaction point on the vehicle on the correct bone.Actual behavior:
Recreation:
bootbone.useEntityInteractionboolean set totrue. This will create an interaction point on the current vehicle that shows when you get out of the vehicle.useEntityInteractionboolean set tofalse. This does create an interaction point (no error while creating) but doesn't seem to actually show at all.