PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

SimulationRadius

Player

float

SimulationRadius determines the radius around the Player/Character in which physically simulated objects, for whom network ownership is set to automatic, are physically simulated by the Player. In cases where a BasePart or assembly is within multiple player’s SimulationRadiuses, the closest player is chosen.

SimulationRadius, measured in studs, starts at 10 and grows at a rate of 5% per second until it reaches Player/MaximumSimulationRadius.

Notes

  • The Player/SimulationRadius can be visualized using PhysicsSettings/AreRegionsShown
  • When this property is changed, the Player/SimulationRadiusChanged event fires
  • For more information on network ownership, please see this tutorial


Code Samples


How to View, Track, and Modify a Player's Simulation Radius

This example demonstrates how to view, track, and modify a player’s simulation radius.

The example modifies and tracks this property for the Player/LocalPlayer. First, the Player/MaximumSimulationRadius is set to 800, which is less than the default 1000 studs.

Next, the Player/SimulationRadius property alternated between incrementing and decrementing by 20 students every 5 seconds. This is done to highlight the effects of changing the radius, most notable when the radius is draw by the physics engine when PhysicsSettings/AreRegionsShown is enabled.

Lastly, the Player/SimulationRadiusChanged function fires when the radius changes and prints the updated radius.

##Note
In order to view the simulation radius, PhysicsSettings/AreRegionsShown must be set to true. It can be found under the Physics tab in Roblox Studio’s settings menu.