Physics Manager

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.



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]
Updates are performed regardless of the Unity frame rate.
Useful when the frame rate fluctuates during the game.
However, the physics engine may be executed multiple times in one frame, and this will cause a wave in performance.

[Once Per Frame]
Updates are made only once per Unity frame.
In this case, the physics engine advances by the time step of [Update Per Second] with one update.
If the frame rate is almost constant during the game, this is a performance advantage.
When using this mode, [Update Per Second] needs to be adjusted to the frame rate of the game.

[Delay Unscaled Time]
Delayed execution.
Update is the same as Unscaled Time, but also runs the Cloth simulation while rendering.
This greatly improves performance.
But note that the result is one frame late.
This delay is interpolated by future prediction.

Update Bone Scale

Settings up to Unity 2019.2.13.
Until Unity2019.2.13, this check needs to be turned ON when changing the runtime scale.
Also note that until Unity 2019.2.13 there will be additional load on the line timescale.


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.


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.


Runtime scaling

The Cloth component can be freely scaled at run time.
However, in Unity 2018 additional processing will occur to calculate the scale value.
Therefore, in Unity 2018 it is necessary to enable or set the runtime scale in the PhysicsManager panel.

This check is not required for Unity 2019 and above.
Also, with Unity 2019 and above, there is almost no calculation load due to runtime scale.