Search Unity

Particle Line Target Offset does not yield proper length/target results

Discussion in 'Visual Effect Graph' started by Charlicopter, Oct 24, 2020.

  1. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    125
    When you apply a target offset to a particle line, it is 1/10th the length it should be. For example, if you spawn a particle line at (0, 0, 0); then apply a target offset to a target of (0, 1, 0); then the resulting line will terminate at (0, 0.1, 0) instead of 0, 1, 0).

    Additionally: The target offset seems counter intuitive...could be a mistake: Setting the root position of a particle line to (0, 1, 0) yields the proper position. But setting the target offset of the line to, say, (0, 1, 1) does not place the tail of the line at that position
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hi, target offset for a line is in the particle space, which means particle attributes are taken into account (position, size, scale, angle, pivot...). By default size attribute is 0.1, this is why you're seeing the line has a size of 0.1.
     
  3. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    125
    Got it. Thank you, Justin.

    If you have a moment: I'm curious why the particle space doesn't default to a unit length? What was the design methodology for that?
     
  4. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    This is arbitrary. 1 unit length generally represents 1 meter in Unity so we decided common use case for particles was to be smaller and used 10 cm as the default size. It avoids having default / not yet set up systems causing overdraw issues.
     
  5. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    125
    Understood, thank you for the explanation.