DaveWortley
01-07-2009, 08:21 PM
I'm doing a bit of an unusual project at the moment.
I've got a few thousand particles on a plane and at the moment their rotation is locked in 2axis but random in the 3rd. I'd like to influence this rotation value by getting the particle to look for the nearest spline and rotating to the tangent of the closest point.
I've tested one way that I thought I might be able to do it, by putting an extrude on the splines and using the MeshProjectionInterface.getclosestFace() then work out the angle of the face and translate that to the particle. But I haven't been able to get this to work. It loops through the particles and the GetFace always equals the same face, and for some reason even if I try assigning the particles' position to the GetHitPos value the particles stay where they were.
I'm lacking in a bit of knowledge on how the MPI works, only finding out through BoBo's latest scripting DVD.
I have thought about painting a map to define rotation using 2 colours but it's going to be a real pain to draw.
Any other ideas?
I've got a few thousand particles on a plane and at the moment their rotation is locked in 2axis but random in the 3rd. I'd like to influence this rotation value by getting the particle to look for the nearest spline and rotating to the tangent of the closest point.
I've tested one way that I thought I might be able to do it, by putting an extrude on the splines and using the MeshProjectionInterface.getclosestFace() then work out the angle of the face and translate that to the particle. But I haven't been able to get this to work. It loops through the particles and the GetFace always equals the same face, and for some reason even if I try assigning the particles' position to the GetHitPos value the particles stay where they were.
I'm lacking in a bit of knowledge on how the MPI works, only finding out through BoBo's latest scripting DVD.
I have thought about painting a map to define rotation using 2 colours but it's going to be a real pain to draw.
Any other ideas?
