Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

particles at mesh positions

particles at mesh positions

mark_aldred
Advocate Advocate
516 Views
1 Reply
Message 1 of 2

particles at mesh positions

mark_aldred
Advocate
Advocate

I'm trying to get this to work ...

https://www.scriptspot.com/bobo/mxs5/pflow/pflow__Chunks_Basics.htm

on ChannelsUsed pCont do
(
    pCont.useAge = true
    pCont.useTM = true
    pCont.useShape = true
)

on Init pCont do
(
    global formulaeArray = $f2_* as array
)

on Proceed pCont do
(
    t = pCont.getTimeStart() as float

    if t < 0 do
    (
        NumPos = formulaeArray.count

        for i = 1 to NumPos do
        (
            pCont.AddParticle()
            pCont.particleIndex = pCont.NumParticles()
            pCont.particleAge = 0
            pCont.particleTM = formulaeArray[i].transform
            pCont.particleShape = formulaeArray[i].mesh
        )
    )
)

on Release pCont do
(

)

It works as far as

pCont.particleShape = formulaeArray[i].mesh

The particles are positioned correctly at the meshes' positions without this line. But if I add that line specifying the mesh, each particle is shifted away from the "parent" meshes. They're offset and spread out.

 

Any idea what could be causing it?

Thanks

Mark

 

 

 

 

0 Likes
Accepted solutions (1)
517 Views
1 Reply
Reply (1)
Message 2 of 2

mark_aldred
Advocate
Advocate
Accepted solution

My fault. I didn't read the part about preparing the meshes.

Works when I do that.

 

 

0 Likes