1
0
forked from cgvr/DeltaVR

add particle effects to archery range model display

This commit is contained in:
2026-03-07 12:33:43 +02:00
parent f1fc906ae5
commit a3b0a20357
5 changed files with 4895 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -15,6 +15,7 @@ public class ModelDisplay : MonoBehaviour
public float generatedObjectRotationSpeed = 10f;
private EventInstance printingSound;
private ParticleSystem.EmissionModule particleEmission;
// Start is called before the first frame update
void Start()
@@ -23,6 +24,9 @@ public class ModelDisplay : MonoBehaviour
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
printingSound.setParameterByName("Occlusion", 0);
printingSound.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(displayPoint));
particleEmission = GetComponentInChildren<ParticleSystem>().emission;
particleEmission.enabled = false;
}
// Update is called once per frame
@@ -38,6 +42,7 @@ public class ModelDisplay : MonoBehaviour
{
printingSound.start();
printingSound.setParameterByName("3DPrinterPrintingJob", 0);
particleEmission.enabled = true;
}
public void DisplayModel(GameObject modelObject)
@@ -57,5 +62,6 @@ public class ModelDisplay : MonoBehaviour
Model = modelObject;
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
particleEmission.enabled = false;
}
}