Modding Help Particle Orientation

Discussion in 'Starbound Modding' started by Tamamo89, Feb 8, 2017.

Tags:
  1. Tamamo89

    Tamamo89 Pangalactic Porcupine

    Not sure what's going on here, but i have a particle that should never be rotated. But it appears its' orientation is rotated based off the sourceEntity' rotation, is there a way too prevent this?
     
  2. IHart

    IHart Scruffy Nerf-Herder

    Code so far?
     
    bk3k likes this.
  3. bk3k

    bk3k Oxygen Tank

    I'm going to guess a transformation group is involved in any case.
     
  4. Tamamo89

    Tamamo89 Pangalactic Porcupine

    Code:
    {
      "kind" : "radioactiveswoosh1",
      "definition" : {
        "type" : "animated",
        "animation" : "/animations/statuseffects/radiationburn/radiationburnshort.animation",
        "position" : [0, 0],
        "finalVelocity" : [0, 2],
        "approach" : [0, 50],
        "size" : 1.0,
        "timeToLive" : 0.45,
        "fade" : 0.5,
        "light" : [50, 90, 0],
        "variance" : {
          "initialVelocity" : [3.0, 3.0]
        }
      }
    }
     
  5. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    That's the file that defines the particle itself, to change how it's animation is rendered, we would need the .animation file referenced here.
    Code:
    "/animations/statuseffects/radiationburn/radiationburnshort.animation"
    
     
    bk3k likes this.
  6. bk3k

    bk3k Oxygen Tank

    I'd say(strongly assume) the problem isn't in the particle, but the animation. The particle emitter is attached to a part that rotates. For an example of how to segregate this, check out
    /items/active/weapons/whip/whip.animation
    /items/active/weapons/whip/energywhip.activeitem
     
  7. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Well looking at the path for the particle, it looks like a status effect.
    So i'm assuming the emitter is an entity which I wouldn't count on rotating too often.
     
  8. bk3k

    bk3k Oxygen Tank

    Well in that case there are 2 different .animation files, but the one I believe we'd want is paired to the status.

    An example file is
    stats/effects/elementalaura/electricaura.animation
    Code:
    {
      "animatedParts" : {
        "stateTypes" : {
          "aura" : {
            "default" : "off",
            "states" : {
              "off" : {},
              "windup" : {
                "frames" : 3,
                "cycle" : 0.5,
                "mode" : "transition",
                "transition" : "on"
              },
              "on" : {
                "frames" : 10,
                "cycle" : 0.9,
                "mode" : "loop"
              }
            }
          }
        },
        "parts" : {
          "aura" : {
            "properties" : {
              "zLevel" : 0
            },
            "partStates" : {
              "aura" : {
                "windup" : {
                  "properties" : {
                    "image" : "electricaura.png:windup.<frame>"
                  }
                },
                "on" : {
                  "properties" : {
                    "image" : "electricaura.png:on.<frame>"
                  }
                }
              }
            }
          }
        }
      },
      "particleEmitters" : {
        "electricAura" : {
          "active" : true,
          "emissionRate" : 20,
          "offsetRegion" : [-3.0, -3.0, 3.0, 3.0],
          "particles" : [
            { "particle" : "electricswoosh1"},
            { "particle" : "electricswoosh2"},
            { "particle" : "electricswoosh2"},
            { "particle" : "fastrisingelectric"}
          ]
        }
      }
    }
    Lets take this part here
    Code:
      "particleEmitters" : {
        "electricAura" : {
          "active" : true,
          "emissionRate" : 20,
          "offsetRegion" : [-3.0, -3.0, 3.0, 3.0],
          "particles" : [
            { "particle" : "electricswoosh1"},
            { "particle" : "electricswoosh2"},
            { "particle" : "electricswoosh2"},
            { "particle" : "fastrisingelectric"}
          ]
        }
      }
    I believe it should be sufficient to do this

    Code:
      "particleEmitters" : {
        "electricAura" : {
          "active" : true,
          "emissionRate" : 20,
          "offsetRegion" : [-3.0, -3.0, 3.0, 3.0],
          "particles" : [
            {
              "particle" : "electricswoosh1",
              "rotation" : 0
            },
            {
              "particle" : "electricswoosh1",
              "rotation" : 0
            },
            {
              "particle" : "electricswoosh1",
              "rotation" : 0
            },
            {
              "particle" : "electricswoosh1",
              "rotation" : 0
            }
          ]
        }
      }
     

Share This Page