StarterPlayer
StarterPlayer : Instance
Overview
This code defines the StarterPlayer class, inheriting from Instance, for managing player-specific settings and camera properties. It includes properties for camera settings like zoom distances, camera modes, health display distance, name display distance, auto jump enabled, movement modes for computer/touch devices, mouse lock option, and camera handling methods. These customizable settings allow developers to optimize the game experience based on device type and user preferences. The class is marked as non-creatable and service-related in a game project using Unreal Engine's Lua support. Some properties are currently commented out, suggesting potential for future implementation
Description
Definition: StarterPlayer is a Lua-based class in Overdare Studio, serving as the foundation for player instances and providing access to various API properties during game creation. It can be customized by developers to enhance the gaming experience. 2. Role in Structure: In Overdare Studio (similar to Roblox Studio), StarterPlayer acts as a blueprint for adjusting player settings, such as camera control, visibility distances, mobile controls, and input handling methods. It simplifies managing multiple players with unique settings within the game environment. 3. API Properties:
Properties
CameraMaxZoomDistance
number
The CameraMaxZoomDistance
property sets the maximum distance in studs that a player's default camera is allowed to zoom out. This number property represents or specifies the maximal distance for the player's default camera to zoom out within game environments.
Code Samples
CameraMinZoomDistance
number
The CameraMinZoomDistance
property in the StarterPlayer
class sets the minimum distance in studs that the player's default camera is allowed to zoom in. As a number property, it specifies the minimum zoom distance for preventing the camera from getting too close to objects. CameraMinZoomDistance represents the minimum allowed distance for zooming in and ensures that the camera cannot approach closer than this specified value.