Skip to content

Commit 985b74b

Browse files
fix: mage heal fx plays out for whole duration & stays at spawn rotation [MTT-4476] (#771)
1 parent f923808 commit 985b74b

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

Assets/Scripts/VisualEffects/SpecialFXGraphic.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections;
23
using System.Collections.Generic;
34
using UnityEngine;
@@ -47,14 +48,22 @@ public class SpecialFXGraphic : MonoBehaviour
4748
[Tooltip("After Shutdown, how long before we self-destruct? 0 means no self destruct. -1 means self-destruct after ALL particles have disappeared")]
4849
private float m_PostShutdownSelfDestructTime = -1;
4950

51+
[SerializeField]
52+
[Tooltip("If this graphic should keep its spawn rotation during its lifetime.")]
53+
bool m_StayAtSpawnRotation;
54+
5055
// track when Shutdown() is called so we don't try to do it twice
5156
private bool m_IsShutdown = false;
5257

5358
// we keep a reference to our self-destruction coroutine in case we need to abort it prematurely
5459
private Coroutine coroWaitForSelfDestruct = null;
5560

61+
Quaternion m_StartRotation;
62+
5663
private void Start()
5764
{
65+
m_StartRotation = transform.rotation;
66+
5867
if (m_AutoShutdownTime != -1)
5968
{
6069
coroWaitForSelfDestruct = StartCoroutine(CoroWaitForSelfDestruct());
@@ -124,6 +133,13 @@ private IEnumerator CoroWaitForSelfDestruct()
124133
}
125134
}
126135

136+
void Update()
137+
{
138+
if (m_StayAtSpawnRotation)
139+
{
140+
transform.rotation = m_StartRotation;
141+
}
142+
}
127143
}
128144

129145

Assets/VFX/Prefabs/Shared Hero FX/FX_Buff.prefab

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ParticleSystem:
106106
m_PreInfinity: 2
107107
m_PostInfinity: 2
108108
m_RotationOrder: 4
109-
moveWithTransform: 1
109+
moveWithTransform: 0
110110
moveWithCustomTransform: {fileID: 0}
111111
scalingMode: 1
112112
randomSeed: 5677
@@ -4925,11 +4925,15 @@ MonoBehaviour:
49254925
m_Enabled: 1
49264926
m_EditorHideFlags: 0
49274927
m_Script: {fileID: 11500000, guid: 8e80714725b908940a76375b52b8d53b, type: 3}
4928-
m_Name:
4929-
m_EditorClassIdentifier:
4930-
m_ParticleSystemsToTurnOffOnShutdown: []
4928+
m_Name:
4929+
m_EditorClassIdentifier:
4930+
m_ParticleSystemsToTurnOffOnShutdown:
4931+
- {fileID: 5082887311387214394}
4932+
- {fileID: 5082887310581284565}
4933+
- {fileID: 5082887311598866503}
49314934
m_AutoShutdownTime: 3
49324935
m_PostShutdownSelfDestructTime: -1
4936+
m_StayAtSpawnRotation: 1
49334937
--- !u!1 &5082887311387214391
49344938
GameObject:
49354939
m_ObjectHideFlags: 0
@@ -9915,7 +9919,7 @@ ParticleSystem:
99159919
m_PreInfinity: 2
99169920
m_PostInfinity: 2
99179921
m_RotationOrder: 4
9918-
moveWithTransform: 1
9922+
moveWithTransform: 0
99199923
moveWithCustomTransform: {fileID: 0}
99209924
scalingMode: 1
99219925
randomSeed: 5678

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
2424
* Reenabled depth buffer in the URP settings to enable the use of soft particles (#762)
2525
* Moved a torch out of a corner so that the flame VFX don't clip (#768)
2626
* Fixed issue where pressing 1 on keyboard would not invoke Revive or Pickup/Drop Actions (#770) Authority on modification of displayed Action now comes from a single spot, ClientInputSender.
27+
* Mage's heal FX plays out on itself and on targets. Added ability for SpecialFXGraphic components to remain at spawn rotation (#771)
2728

2829
## [2.0.0] - 2022-10-06
2930

0 commit comments

Comments
 (0)