Search Unity

Question Trying to spawn an array of meshes using vfx graph

Discussion in 'Visual Effect Graph' started by AbdullahShafqat, Apr 8, 2022.

  1. AbdullahShafqat

    AbdullahShafqat

    Joined:
    Aug 26, 2020
    Posts:
    1
    I had been following along this tutorial:

    It works great but as you can see at timestamp 7:39 each succeeding column of books has a certain offset.
    And in my remake of this using my candle asset the offset was even greater.
    upload_2022-4-8_18-32-50.png
    (notice the offset on each column)

    My try at doing this:
    upload_2022-4-8_18-30-51.png
    (the value from Vector3 is input into the SetPosition)

    Here I was trying to separate the particles into buckets using modulo with particleId simply multiplying this with a float for z coordinates, for the y coordinate I test to see if the module for that particleId is zero only in which case I multiply y coordinate with float.
    upload_2022-4-8_18-32-1.png
    (after the first row the candles start getting same z coordinate value)

    The result are not as expected.
    How would one go getting the desired output?