world.entityAimPosition

This commit is contained in:
Kae 2024-05-01 05:04:15 +10:00
parent 840d64dbed
commit 9e3048ea16

View File

@ -539,6 +539,11 @@ namespace LuaBindings {
return entity->isInteractive();
return {};
});
callbacks.registerCallback("entityAimPosition", [world](EntityId entityId) -> Maybe<Vec2F> {
if (auto entity = world->get<ToolUserEntity>(entityId))
return entity->aimPosition();
return {};
});
callbacks.registerCallback("entityMouthPosition", [world](EntityId entityId) -> Maybe<Vec2F> {
if (auto entity = world->get<ChattyEntity>(entityId))
return entity->mouthPosition();