renzora
Game Engine

Camera lookaround Script

First-person mouse look script for any camera entity. Smooth, drift-free rotation using accumulated pitch and yaw. Supports configurable sensitivity and optional Y-axis inversion. Locks the cursor automatically on start. Designed to pair with any movement script — exposes camera_yaw so character movement scripts can orient relative to where the player is looking. How to Use: 1. Add this script to your Camera entity 2. Add a movement script (e.g. WASD Movement) to your Character entity 3. Press play — mouse controls the camera, movement follows camera direction Setup (typical hierarchy): Player (entity) ├── CharacterController + WASD Movement script └── Camera3D + Mouse Look script The camera reads mouse_delta_x / mouse_delta_y each frame and applies accumulated yaw and pitch with a -89 to +89 degree pitch clamp to prevent flipping. On ready, it initializes from the entity's current rotation so it respects whatever orientation you set in the editor. Tips: - Sensitivity of 0.10–0.20 feels natural for most players - Works with any movement script — the engine automatically provides camera_yaw to sibling/parent scripts - Call unlock_cursor() from another script if you need to show a pause menu

Camera lookaround Script

Free · by renzora · 5 downloads