Physical manager
PhysicsManager is a manager that manages the entire Magica Cloth component.
One is required for each scene.
Place in scene
In order for MagicaCloth to work, the MagicaPhysicsManager needs to be placed in the scene.
It is already prefabricated, so place the next prefab in your scene.
Also, be sure to place the prefab on the Hierarchy route (see below).
Property
Set the frequency of updating the physics engine of MagicaCloth.
Basically, there is almost no problem with the default settings, but there are cases where it is advantageous to adjust the settings for the project in terms of performance.
Item | Description |
Enabled | You can stop the entire MagicaCloth operation by turning off the Enabled flag of the component. |
Update Per Second | Number of physics engine updates per second. The more updates, the stronger the physics engine, but at the expense of performance. The default setting is 90 times. |
Update Mode |
Update time method. [Unscaled Time] [Once Per Frame] [Delay Unscaled Time] |
Update Location |
The update position of the simulation. [Before Late Update] |
Faster Write |
By turning this option on, Render Deformer will use Unity’s new Mesh API to update the mesh vertices. |
OnPreUpdate |
It is possible to register the event before executing the cloth-simulation. |
OnPostUpdate |
It is possible to register the event after executing the cloth-simulation. |
Manager is not destroyed
The PhysicsManager is set to not be deleted when the scene is destroyed.
Basically, by placing it in the scene that will be loaded first in the game, it will always be active during the game.
However, be sure to place the manager in the root hierarchy of your scene to enable this feature.
This feature cannot be used if the manager is not placed in the root hierarchy.
The second manager is destroyed, but the settings are copied
If a second manager is found, it will be destroyed.
However, that manager’s settings are overwritten by the current manager.
Delayed execution
By setting UpdateMode to [Delay Unscaled Time], the cloth simulation will be executed even during rendering.
This can greatly improve performance, but note that the result is one frame later.
However, this delay can be interpolated by future prediction.
Item | Description |
Future Prediction Rate | Future prediction rate. At 1.0, the future prediction is performed up to one frame ahead and the result is interpolated. 0.5 predicts the future up to 0.5 frames ahead. If set to 0.0, no future prediction is performed. |
Next is a comparison image of the future prediction.
Without future prediction | With future prediction |
In the left image, the foot passes through the cloth because it is delayed by one frame.
However, the image on the right does not penetrate because it is interpolated by future prediction.