nParticle aim direction


#1

I have nParticles instances in a circle and I am trying to get their aim direction to point to the center of the grid so all characters are facing towards the centre of the circle. (towards the guy in the middle of the circle)
I tried something similar to the following thread: http://forums.cgsociety.org/showthread.php?f=86&t=1081832&highlight=aim+direction 
And I created a vector attribute called aimPP.

and inside I added the expression:
nParticleShape1.aimPP = <<0, 0,0>>;
Then I set the aimDirection to aimPP.

I would appreciate any help.

p, li { white-space: pre-wrap; }


#2

I think you need to define an aim vector.
You currently use <<0,0,0> which doesn’t define a characters axis to aim.

It looks as though Z is your aim direction based on your image.

So,
<<0,0,1>>
Then use aimPP as your aim direction.

Finally, you need to give the particles the center of the grid as a target to aim at , a particle goal object should do the trick, or an attract field.


#3

I think you can subtract the grid center from the character’s position to get the aim vector. That would avoid goals and fields. If the grid center is at the the origin then just use the position as the aim.


#4

I found after lots of searching around, this thread and on page 2 is the solution with using a cube to point the characters to center of grid: http://forums.cgsociety.org/showthread.php?f=86&t=789536&page=1&pp=15&highlight=particle+instance+directionThere were 2 vector attributes that I had to setup, an aim position (using the information from the cube thread above) and also I had to create an Aim Axis as my character pointed z axis forward, I used a vector attribute called aim axis and used the <<0,0,1>> and the combination of the two attributes worked in my case.