# Physic Simulator

This class sets up and manages different physics simulators.

### **Members**

* `private Simulator _simulator`:
  * A `_simulator` variable representing the physics simulator used.
* `private bool _isOnlyServer`:
  * Variable that determines whether the physics simulator will only run on the server

### **Methods**

1. ```csharp
   public void SetSimulator(Simulator simulator)
   ```
   * **Parameters:**
     * `simulator`: Physics simulator to be tuned.
   * Sets physics simulator.
   * Calls the `Init` method.
2. ```csharp
   private void Awake()
   ```
   * If you want it to run only on the server and the client is active, disable the component.
   * If the network server is not active, it is disabled.
   * Creates a simulator according to the physics mode specified in the room manager.
   * The physics simulator wake-up process is initiated.
3. ```csharp
   private void FixedUpdate()
   ```
   * It is called in constant step.
   * It returns if the network server is not active.
   * The constant step update of the physics simulator is started.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reflective-roommanager.gitbook.io/docs/user-manual/physic/simulator/physic-simulator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
