Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/objects/enums/CameraMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ icon: polytoria/Enum
| ------------------------- | ----------------------------------------------- |
| `CameraMode.Scripted` | Camera is able to be controlled by scripts |
| `CameraMode.FollowPlayer` | Camera is controlled by the player `(default)` |
| `CameraMode.FreeCam` | Camera is able to be freely moved by the player |
| `CameraMode.Free` | Camera is able to be freely moved by the player |
| `CameraMode.FollowTarget` | Camera follows a DynamicInstance |
21 changes: 9 additions & 12 deletions docs/objects/static-classes/Input.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,20 @@ end)

### KeyUp(key;string) { event }

Fires when a key is released.
Fires when a key is released. Also uses an Unity key value.

```lua
Input.KeyUp:Connect(function (key)
print(key .. " was pressed!")
print(key .. " was released!")

if key == "P" then
print("The 'P' key was pressed!")
print("The 'P' key was released!")
end
end)
```

## Methods

<div data-search-exclude markdown>
!!! danger "Undocumented Methods"

This section is a work in progress! The method `GetMouseWorldPoint` is not written yet. Want to contribute? Go to the GitHub and open a pull request [here](https://github.com/Polytoria/Docs)!

</div>

### GetAxis(axisName;string):float { method }

Returns the value of the specified axis.
Expand Down Expand Up @@ -81,7 +74,7 @@ Returns `true` during the frame in which the specified key was pressed.

### GetKeyUp(keyName;string):bool { method }

Returns `true` during the frame in which the specified key was released.
Returns `true` during the frame in which the specified key was released. Uses an Unity key value.

### GetMouseButton(mouseButton;int):bool { method }

Expand All @@ -99,13 +92,17 @@ Returns `true` during the frame in which the specified mouse button was released

Returns the 3D world-space position corresponding to the current mouse cursor location.

### GetMouseWorldPoint:Vector3 { method }

Returns the 3D world-space position corresponding to the current mouse cursor location relative to the camera.

### ScreenPointToRay(position;Vector3, List ignoreList = null):RayResult { method }

Cast a ray from the camera at screen point into the game world

### ViewportPointToRay(position;Vector3, List ignoreList = null):RayResult { method }

Cast a ray from the camera at the specified ViewportPoint (Vector3 with components with values in range of 0 - 1 describing how far a point is to to right and to the top of the screen) into the game world
Cast a ray from the camera at the specified ViewportPoint (Vector3 with components with values in range of 0 - 1 describing how far a point is to the right and to the top of the screen) into the game world

### ScreenToViewportPoint(screenPosition;Vector3):Vector3 { method }

Expand Down