Notifications
Clear all

[Closed] [pFlow] mParticles collision problem

Hello.
I have a plane with PFlow Collision Shape modifier and a particle emitter somewhere above which emits a single box falling down with the gravity. I’m trying to make a callback function which sets the plane position exactly below the particle to make it fall on it. It works, but I can’t make the collision work this way, the box shape just falls through the plane, it always gets the plane’s initial position and what the callback function does is not visible for the physics solver. Any ideas?

source = getnodebyname "PF Source 001"
deck = getnodebyname "Plane001"

fn timeChangeFn =
(
	numParticles = source.numParticles()
	if (numParticles == 1) then
	(
		local particlePos = source.getParticlePosition 1
		deck.pos = [particlePos.x, particlePos.y, 0]
	)
)

registerTimeCallback timeChangeFn