Add Position (Global SDF) particle module

This commit is contained in:
Wojciech Figat
2022-03-28 10:27:33 +02:00
parent f608d2537f
commit bcc4a2c0a4
4 changed files with 43 additions and 2 deletions

View File

@@ -888,7 +888,6 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.ComboBox(0, -10.0f, 160, 2, typeof(ParticleModelFacingMode)),
},
},
new NodeArchetype
{
TypeID = 214,
@@ -912,6 +911,20 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.Input(-0.5f + 2.0f, "Velocity Scale", true, typeof(float), 2, 4),
},
},
new NodeArchetype
{
TypeID = 215,
Create = CreateParticleModuleNode,
Title = "Position (Global SDF)",
Description = "Places the particles on Global SDF surface (uses current particle position to snap it to SDF)",
Flags = DefaultModuleFlags,
Size = new Vector2(200, 0 * Surface.Constants.LayoutOffsetY),
DefaultValues = new object[]
{
true,
(int)ModuleType.Initialize,
},
},
GetParticleAttribute(ModuleType.Initialize, 250, "Set Position", "Sets the particle position", typeof(Vector3), Vector3.Zero),
GetParticleAttribute(ModuleType.Initialize, 251, "Set Lifetime", "Sets the particle lifetime (in seconds)", typeof(float), 10.0f),
GetParticleAttribute(ModuleType.Initialize, 252, "Set Age", "Sets the particle age (in seconds)", typeof(float), 0.0f),