Made with ❤️ by criskkky
Warning
ACK: Due to engine limitations (I guess), certain attack actions (shooting or knifing) may be performed from the camera view instead of the player's actual position. Address this problem by switching between available damage modes in the configuration.
ThirdPerson is a plugin for SwiftlyS2 that provides third-person camera functionality for Counter-Strike 2. It allows players to switch between first-person and third-person views with customizable camera settings, damage blocking options, and smooth camera movement. The plugin includes permission-based access controls and supports both instant and smooth camera transitions.
-
📦Download Latest Plugin Version ⇢ Click Here -
⚙️Download Latest SwiftlyS2 Version ⇢ Click Here
- Third-Person Toggle: Players can toggle third-person view on/off using configurable commands.
- Dual Camera Modes: Support for both instant camera positioning and smooth interpolated movement.
- Configurable Damage Blocking: Choose between blocking damage from behind ("back") or disabling all damage ("none") in third-person mode.
- Permission-Based Access: Control who can use third-person functionality with customizable permissions.
- Customizable Camera Settings: Adjust camera distance, height, and smoothing parameters.
- Real-time Updates: Camera positions update smoothly every server tick.
- Multi-language Support: Some translations included.
Warning
Make sure you have installed SwiftlyS2 Framework before proceeding.
- Download and extract the latest plugin version into your
swiftlys2/pluginsfolder. - Perform an initial run in order to allow file generation.
- Generated file will be located at:
swiftlys2/configs/plugins/ThirdPerson/config.jsonc - Edit the configuration file as needed.
- Configure permissions in your server's
permissions.jsoncfile. - Enjoy!
| Option | Type | Example | Description |
|---|---|---|---|
| CustomTPCommand | string | "tp" |
Custom command to toggle third-person view. Default: "tp". |
| Permission | string | "thirdperson.use" |
Permission required to use third-person functionality. Leave empty to allow all players. |
| DamageMode | string | "back" |
Damage blocking mode: "back" (block damage dealt from behind your character) or "none" (block all damage). |
| ThirdPersonDistance | float | 100.0 |
Distance of the third-person camera from the player. |
| ThirdPersonHeight | float | 20.0 |
Height offset of the third-person camera. |
| SmoothCameraEnabled | boolean | true |
Enable smooth camera movement interpolation. |
| SmoothCameraSpeed | float | 5.0 |
Speed of smooth camera movement (higher = faster). |
| EnableKnifeWarnings | boolean | true |
Enable warnings when players try to knife attack in third-person view. |
ThirdPerson uses permission-based access control:
- If
Permissionis empty, all players can use third-person functionality. - If
Permissionis set, only players with that permission will be able to toggle third-person view.
For more details on configuring permissions, see the SwiftlyS2 permissions documentation and make sure to update your server's permissions.jsonc file.
- When a player uses the third-person command, the plugin creates a camera entity positioned behind the player.
- Camera positioning uses raycasting to avoid clipping through walls and provides collision detection.
- Damage blocking is implemented through entity damage hooks, preventing damage based on the configured mode.
- Smooth camera movement uses linear interpolation for fluid transitions between positions.
- The plugin hooks into game events (round start, player death, disconnect) for intelligent resource cleanup.
- Permission checks ensure only authorized players can access third-person functionality.
Feel free to open an issue for any bugs or feature requests. If it's all working fine, consider starring the repository to show your support!
Contributions are welcome only if they align with the plugin's purpose. For major changes, please open an issue first to discuss what you would like to change.
