Particle system improvements:
- particles can collide with the outer walls of the sub - drag + waterdrag parameters - fixed particles "twitching" when the submarine is moving fast - submarine velocity only affects the initial velocity of the particles (i.e. accelerating the sub doesn't automatically accelerate them)
This commit is contained in:
@@ -20,6 +20,8 @@ namespace Barotrauma.Particles
|
||||
public readonly Vector2 StartSizeMin, StartSizeMax;
|
||||
public readonly Vector2 SizeChangeMin, SizeChangeMax;
|
||||
|
||||
public readonly float Drag, WaterDrag;
|
||||
|
||||
public readonly Color StartColor;
|
||||
public readonly float StartAlpha;
|
||||
|
||||
@@ -89,6 +91,9 @@ namespace Barotrauma.Particles
|
||||
SizeChangeMax = SizeChangeMin;
|
||||
}
|
||||
|
||||
Drag = ToolBox.GetAttributeFloat(element, "drag", 0.0f);
|
||||
WaterDrag = ToolBox.GetAttributeFloat(element, "waterdrag", 0.0f);
|
||||
|
||||
Restitution = ToolBox.GetAttributeFloat(element, "restitution", 0.5f);
|
||||
|
||||
switch (ToolBox.GetAttributeString(element, "blendstate", "alphablend"))
|
||||
|
||||
Reference in New Issue
Block a user