BaseCloth

Overview

A common class for cloth components.
BaseCloth is the base class for BoneCloth / BoneSpring / MeshCloth / MeshSpring.

 


public void ResetCloth()
public void ResetCloth(float resetStabilizationTime)
public void ResetCloth(ClothParams.TeleportMode teleportMode, float resetStabilizationTime = -1.0f)

Resets the cloth simulation particle position.

resetStabilizationTime

Stabilization time (s) after reset.
Sudden extrusion due to collision detection after simulation reset is suppressed for this time.
If you specify a negative value, the value set in the Inspector will be used.

teleportMode

[Reset]
Reset the simulation once after teleporting.

[Keep]
Maintain the simulation after teleporting.

 


public void SetTimeScale(float timeScale)

Set the time scale.
Slow playback is possible for each component individually.

timeScale Time scale.
Specify from 0.0 (0%) to 1.0 (100%).

 


public float GetTimeScale()

Get the time scale.

 


public void AddForce(Vector3 force, PhysicsManagerTeamData.ForceMode mode)

Apply external force.

force External force vector
mode Speed change mode.
[VelocityAdd]
Add to velocity (affected by mass)
[VelocityChange]
Change velocity (affected by mass)
[VelocityAddWithoutMass]
Add to velocity (ignoring mass)
[VelocityChangeWithoutMass]
Change velocity (ignoring mass)

 


public float BlendWeight

Blending ratio with original posture.
(0.0 = 0%, 1.0 = 100%)

 


public void AddCollider(ColliderComponent collider)

Add Collider.

 


public void RemoveCollider(ColliderComponent collider)

Remove Collider.

 


public void SetUpdateMode(TeamUpdateMode updateMode)

Change the update mode.

Normal Update based on the frame rate.
(Initial setting)
UnityPhysics Update based on Unity’s physics.
If the character moves within FixedUpdate, you can suppress the vibration by selecting this.

 


public void SetCullingMode(TeamCullingMode cullingMode)

Change the culling mode.

Off No culling is performed.
The simulation will always run regardless of the drawing state.
Reset If it is off-screen, stop the simulation.
When it appears again, it resets the simulation.
Pause If it is off-screen, it stops the simulation.
When it reappears, it will restart the simulation from the stopped state.

 


public void Radius_SetRadius(float startVal, float endVal, float curveVal = 0)

Change the [Radius] parameter particle radius.

 


public void Mass_SetMass(float startVal, float endVal, float curveVal = 0)

Change the particle weight in the [Mass] parameter.

 


public void Gravity_SetGravity(float startVal, float endVal, float curveVal = 0)

Change the gravitational acceleration of the [Gravity] parameter.

 


public Vector3 Gravity_GravityDirection

Change the direction of gravity of the [Gravity] parameter.
Note that this specifies the ceiling direction in world space.

 


public void Drag_SetDrag(float startVal, float endVal, float curveVal = 0)

Change the air resistance of the [Drag] parameter.

 


public bool DistanceDisable_Active

Changes the active state of the [Distance Disable] parameter.

 


public Transform DistanceDisable_ReferenceObject

Changes the distance measurement target of the [Distance Disable] parameter.
If you specify null, the current main camera will be the target.

 


public float DistanceDisable_Distance

Changes the distance at which the [Distance Disable] parameter is disabled.

 


public float DistanceDisable_FadeDistance

Changes the fade distance of the [Distance Disable] parameter.
The fade starts at DistanceDisable_Distance minus this distance.

 


public float ExternalForce_MassInfluence

Changes the influence of particle weight on the [External Force] parameter.
The value is between 0.0 (0%) and 1.0 (100%).

 


public float ExternalForce_WindInfluence

Changes the wind influence rate of the [External Force] parameter.
The value is between 0.0 (0%) and 1.0 (100%).
A value of 1.0 or more can be set.

 


public float ExternalForce_WindRandomScale

Changes the wind random rate of the [ExternalForce] parameter.
The value is between 0.0 (0%) and 1.0 (100%).
A value of 1.0 or more can be set.

 


public void WorldInfluence_SetMovementInfluence(float startVal, float endVal, float curveVal = 0)

Change the movement influence rate of the [World Influence] parameter.

 


public void WorldInfluence_SetRotationInfluence(float startVal, float endVal, float curveVal = 0)

Change the rotation influence rate of the [World Influence] parameter.

 


public bool WorldInfluence_ResetAfterTeleport

Change the automatic teleport enable setting for the [World Influence] parameter.

 


public float WorldInfluence_TeleportDistance

Change the automatic teleport of [World Influence] parameter and the moving distance of one frame to be detected.

 


public float WorldInfluence_TeleportRotation

Change the auto teleport of the [World Influence] parameter and the rotation angle (0 – 360) of one frame to be detected.

 


public void WorldInfluence_ReplaceInfluenceTarget(Transform target)

Replace InfluenceTarget.

 


public bool ColliderCollision_Active

Change the active state of the [Collider Collision] parameter.

 


public bool Penetration_Active

Changes the active state of the [Penetration] parameter.

 


public void Penetration_SetMovingRadius(float startVal, float endVal, float curveVal = 0)

Change the MovingRadius of the Penetration parameter.

 


public void ClampPosition_SetPositionLength(float startVal, float endVal, float curveVal = 0)

Change the Length of the Clamp Position parameter.

 


public bool Spring_Active

Sets the active state of the Spring parameter.

 


public float Spring_Power

Change the Spring Power of the Spring parameter.

 

end.