Hi All first post so here goes…
I have an nParticle system with instanced geometry. I have custom attributes controlling scale, rotation and rotation speed. Thus…
float $scaleNum = rand(.001,.5);
nParticleShape1.CustomScale = <<$scaleNum,$scaleNum,$scaleNum>>;
nParticleShape1.CustomOrient = <<rand(360),rand(360),rand(360)>>;
nParticleShape1.CustomSpeed03 = rand(-10,10);
I also have this puppy in my Runtime before dynamics…
nParticleShape1.CustomOrient += nParticleShape1.CustomSpeed03;
OK all good so far! Now I have a plane as a ground object and when the Particles hit this puppy I would like them to come to a stand still and stop rotating!
So I made the ground plane a Passive Collider. I then created a collision event called Event01. (Im not sure if Im doing this correct?)…
Ok so now in Expression Editor I’m using this code in runtime before Dynamics to stop the rotations…
nParticleShape1.CustomOrient += nParticleShape1.CustomSpeed03;
if (nParticleShape1.Event01>=1)
{
nParticleShape1.CustomOrient = <<0,0,0>>;
}
and I get this result…
// Error: Attribute not found or variable missing ‘$’: nParticleShape1.Event01
I’m really not sure where I’m going wrong, is it in the collision event editor?? I just don’t know . If anyone out there could help me to shed some light into this issue, I will gladly buy you a beer or two.
Many thanks in advance
Ant