mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add buoyancy and density properties
This commit is contained in:
parent
addc0041ab
commit
250d51abf4
@ -114,6 +114,8 @@ namespace NewHorizons.Builder.Body
|
||||
fluidVolume._attachedBody = rb;
|
||||
fluidVolume._triggerVolume = buoyancyTriggerVolume;
|
||||
fluidVolume._radius = waterSize;
|
||||
fluidVolume._buoyancyDensity = module.buoyancy;
|
||||
fluidVolume._density = module.density;
|
||||
fluidVolume._layer = LayerMask.NameToLayer("BasicEffectVolume");
|
||||
|
||||
var fogGO = GameObject.Instantiate(_oceanFog, waterGO.transform);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.VariableSize
|
||||
{
|
||||
@ -11,6 +12,16 @@ namespace NewHorizons.External.Modules.VariableSize
|
||||
/// </summary>
|
||||
public float size;
|
||||
|
||||
/// <summary>
|
||||
/// Density of the water sphere. The higher the density, the harder it is to go through this fluid.
|
||||
/// </summary>
|
||||
[DefaultValue(1.2f)] public float density = 1.2f;
|
||||
|
||||
/// <summary>
|
||||
/// Buoyancy density of the water sphere
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float buoyancy = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Tint of the water
|
||||
/// </summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user