Breathe & Instability
Now that the shield looks solid, it’s time to bring it to life. The Breathe & Instability settings add pulsing and wobbling effects that react to damage and create a sense of tension.
Phase
The Phase value is automatically managed by the ShieldController.
Instead of relying on a simple Time node (which can lead to slight desynchronization between visuals and colliders), the ShieldController directly controls the breathing animation phase:
_phase += Time.deltaTime * BreatheFrequency * Mathf.PI * 2f
This ensures that the shield mesh, its collider, and any hit effects always stay perfectly aligned with each other during the breathing animation.
Behaviour
The Behaviour setting allows you to choose how the shield animation is driven:
Rely On Phase
Best suited for animated shields and hit effects controlled by the ShieldController. This mode ensures the shield, collider, and effects remain perfectly synchronized using the internally managed phase.
Rely On Time
Recommended if you just want to preview or showcase shield visuals without runtime adjustments. In this mode, the animation runs directly off Unity’s time, without requiring the ShieldController.
Breathe Frequency
Defines the speed of the breathing (pulse) animation. Higher values create a faster pulse effect.
💡 Tip: Lower frequencies feel calm and stable, while higher frequencies work well for shields under pressure or in a damaged state.
Breathe Strength
A Vector3 property that defines the breathing offset along each axis, giving you fine control over the shield’s pulsing shape.
💡 Tip: Use the same values for all axes to create a uniform pulse. Try different values for a broken or distorted effect where the shield stretches unevenly.
Instability Strength
Controls the intensity of the wobbling effect, making the shield appear unstable or flickering.
⚠️ Note: Instability is built on top of the Breathe Effect. If Breathe frequency and strength is disabled, Instability will also be disabled.
💡 Tip: Small values add subtle instability, while larger values simulate shields that are close to collapsing.
Instability Speed
Defines how quickly the wobble effect plays out.
Last updated