-
Notifications
You must be signed in to change notification settings - Fork 7
client.controllers.SpringCam.SpringCamera
client/controllers/SpringCam.SpringCamera
Manages the creation of a spring-based camera on a player's character
OnInit
• Private janitor: Janitor<void>
src/client/controllers/SpringCam.ts:15
▸ Private Create(): void
Creates the spring camera on the player's head by creating a subject basepart and connecting it's position to a spring which moves to the player's head. Updates the camera on render stepped by calling UpdateCamera with the subject and spring.
void
src/client/controllers/SpringCam.ts:36
▸ Private Destroy(): void
Destroys the camera by cleaning up the janitor which has the subject added if the Create() method was ran and unbinds the UpdateSubject function from renderstepped.
void
src/client/controllers/SpringCam.ts:123
▸ onInit(): void
calls creates the camera by calling Create() when a player's character is loaded in and destroys the camera by calling Destroy() when the player's character is removed.
void
OnInit.onInit
src/client/controllers/SpringCam.ts:20
▸ Static Private UpdateCamera(deltaTime, spring, subject): void
Updates the camera by setting the goal of the spring and updating the position of the subject.
| Name | Type | Description |
|---|---|---|
deltaTime |
number |
- |
spring |
export=<Vector3> |
a spring which will have it's goal set to the player's head |
subject |
BasePart |
an invisible basepart which will take on the same position as the spring and is the subject of the player's camera |
void
- client/controllers/SpringCam
- client/controllers/Direction
- client/controllers/Rotation
- client/controllers/Shake
- client/controllers/Input
- server/modules/InputParser
- server/modules/Middleware
- server/modules/AnimPlayer
- server/modules/Action
- server/modules/Defer