[Closed] Mesh Deformations by Particles
So I’m trying to overcome a problem. I took a look at orbaz tutorial thread that galagast did about this to help me with the logic.
I’m haveint the oddest problem of the mesh not reseting, its baking itself when i scrub back. But when I reevaluate the script the shit resets. So its like the code is right it seems, but it just skips the mesh reset block or something
My Birth Script
on ChannelsUsed pCont do
(
pCont.usePosition = true
pCont.useVector = true
)
on Init pCont do
(
global dObj = $Plane01
global numVerts = getNumVerts dObj
)
on Proceed pCont do –initialize
(
global InitialPosition = for i=1 to getNumVerts dObj collect (getVert dObj i)
for n=1 to numVerts do setVert dObj n InitialPosition[n]
dObj.mesh = $Plane01_Rest.mesh
update dObj
t = pCont.getTimeStart() as float
if t < 0 do ( for v = 1 to numVerts do ( pCont.addParticle() pCont.particleIndex = pCont.NumParticles() --last particle that was added setVert dObj v InitialPosition[v] pCont.setParticlePosition v InitialPosition[v] ) )
)
on Release pCont do
()
A short script OP placed in the global event
on ChannelsUsed pCont do
(
pCont.usePosition = true
)
on Init pCont do
()
on Proceed pCont do
(
for n =1 to numVerts do
(
setVert dObj n (pCont.getParticlePositionByID n)
)
)
on Release pCont do
()
Thanks in advance