mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Resize black hole entry effect to the size of the black hole
Resolves #215
This commit is contained in:
parent
c5873aa0ef
commit
6413a0284d
@ -213,8 +213,19 @@ namespace NewHorizons.Builder.Body
|
||||
|
||||
var blackHoleVolume = Object.Instantiate(_blackHoleVolume, singularity.transform);
|
||||
blackHoleVolume.name = "BlackHoleVolume";
|
||||
blackHoleVolume.SetActive(true);
|
||||
|
||||
// Scale vanish effect to black hole size
|
||||
var bhVolume = blackHoleVolume.GetComponent<BlackHoleVolume>();
|
||||
foreach (var ps in bhVolume._vanishEffectPrefab.GetComponentsInChildren<ParticleSystem>())
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete - It tells you to use some readonly shit instead
|
||||
ps.scalingMode = ParticleSystemScalingMode.Hierarchy;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
bhVolume._vanishEffectPrefab.transform.localScale = Vector3.one * horizon / 100f;
|
||||
|
||||
blackHoleVolume.SetActive(true);
|
||||
|
||||
bhVolume._audioSector = sector;
|
||||
bhVolume._emissionSource = oneShotOWAudioSource;
|
||||
var blackHoleSphereCollider = blackHoleVolume.GetComponent<SphereCollider>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user