-
Notifications
You must be signed in to change notification settings - Fork 14
Creating the menu
Kiminaze edited this page Apr 8, 2022
·
1 revision
Registers a new function that gets called when opening the menu. Used to set up all the options inside the menu.
ECM:Register(function(screenPosition, hitSomething, worldPosition, hitEntity, normalDirection)
end)| Parameter | Type | Range | Description |
|---|---|---|---|
| screenPosition | vector2 | (0, 0) to (1, 1) | The position of the cursor on the screen. |
| hitSomething | bool | true or false | If anything was clicked at all. |
| worldPosition | vector3 | world coordinates | The position that was clicked in the world. |
| hitEntity | integer | - | The entity handle if an entity was clicked. |
| normalDirection | vector3 | (0, 0, 0) to (1, 1, 1) | Surface normal of the clicked surface. |