Set Position (Shape : Sphere) | Visual Effect Graph | 10.2.2
docs.unity3d.com
    Show / Hide Table of Contents

    Set Position (Shape : Sphere)

    Menu Path : Position > Set Position (Shape : Sphere)

    The Set Position (Shape : Sphere) block calculatesa position based on an input ArcSphere and stores the result in the position attribute, based on composition.

    The ArcSphere shape adds an arc property to the sphere to determine its arc angle, in radians. setting an arc value of pi creates a hemisphere.

    This Block can calculate the position either from the ArcSphere's Surface, Volume, or Thick Surface where thickness can be relative to the size of the shape, or an absolute value.

    This Block also calculates a direction vector based on the calculated position on the shape, and stores it to the direction attribute, based on composition. This direction is equal to the normalized vector from the center of the sphere to the calculated position.

    Note: Velocity from Direction and Speed Blocks can then process the direction attribute.

    Block compatibility

    This Block is compatible with the following Contexts:

    • Initialize
    • Update
    • Any output Context

    Block settings

    Setting Type Description
    Position Mode Enum Specifies how this Block uses the shape to calculate a position. The options are:
    • Surface: Calculates positions only on the shape’s surface.
    • Volume: Calculates positions inside the entire shape’s volume.
    • Thickness Absolute: Calculates positions on a thick surface of given absolute thickness.
    • Thickness Relative will compute a position on a thick surface of a given percentage of the Shape’s size.of a given percentage of the Shape’s size.
    Spawn Mode Enum The method this Block uses to distribute particles along the shape’s arc.
    • Random: Calculates a per-particle random progress (0..1) on the arc.
    • Custom: Allows you to specify the progress in the Arc Sequencer property.
    Composition Position Enum (Inspector) Specifies how this Block composes the position attribute. The options are:
    • Set: Overwrites the position attribute with the new value.
    • Add: Adds the new value to the position attribute value.
    • Multiply: Multiplies the position attribute value by the new value.
    • Blend: Interpolates between the position attribute value and the new value. You can specify the blend factor between 0 and 1.
    Composition Direction Enum (Inspector) Specifies how this Block composes the direction attribute. The options are:
    • Set: Overwrites the position attribute with the new value.
    • Add: Adds the new value to the position attribute value.
    • Multiply: Multiplies the position attribute value by the new value.
    • Blend: Interpolates between the position attribute value and the new value. You can specify the blend factor between 0 and 1.

    Block properties

    Input Type Description
    ArcSphere ArcSphere The ArcSphere that determines the shape to calculate the position from.
    Thickness Float The thickness of the shape’s surface for position calculation.
    This property only appears if you set Position Mode to Thickness Relative or Thickness Absolute.
    Arc Sequencer Float The position in the arc to spawn particles.
    This property only appears if you set Spawn Mode to Custom.
    Blend Position Float The blend percentage between the current position attribute value and the newly calculated position value.
    This property only appears if you set Composition Position to Blend.
    Blend Direction Float The blend percentage between the current direction attribute value and the newly calculated direction value.
    This property only appears if you set Composition Direction to Blend.
    In This Article
    • Block compatibility
    • Block settings
    • Block properties
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023