> For the complete documentation index, see [llms.txt](https://docs.streamavatars.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/classes/objectphysics/addcircletrigger.md).

# addCircleTrigger

```lua
function yourEvent(user, object, eventType)
    if user ~= nil then
        if eventType == 'enter' then
            log(user.displayName .. 'entered');
        end
        if eventType == 'exit' then
            log(user.displayName .. 'exited');
        end
    else
        if eventType == 'mouseEntered' then
        end
        if eventType == 'mouseExited' then
        end
        if eventType == 'mouseDown' then
        end
        if eventType == 'mouseUp' then
        end
     end
end

return function()
    local app = getApp();
    local myObject = app.createGameObject();
    wait(3);
    
    myObject.physics.addCircleTrigger();
    app.addEvent('triggerObject', 'yourEvent');
    keepAlive();
end
```
