PDA

View Full Version : AngleBetween command trouble


Aikiman
11-11-2010, 02:37 AM
Im trying to get instanced particles to face goal normal using rotation instead of aimdirection but for some reason my angleBetween command is returning a whole bunch of zeros when I place the goal normal vector in -v2. Any ideas?

vector $normal = particleShape1.goalWorldNormal0PP;
float $myAngleBet[] = `angleBetween -euler -v1 1 0 0 -v2 ($normal.x) ($normal.y) ($normal.z)`;
//print ($myAngleBet);
particleShape1.myRotPP = <<$myAngleBet[0],$myAngleBet[1],$myAngleBet[2]>>;

If I hard code a vector value in -v2 I get the right rotations but I want it based on per particle goalWorldNormal.

Aikiman
11-11-2010, 02:57 AM
Forget I said anything, this does work just that on frame 1 the values are zero, whereas frame 2 they change and I had this on creation expression.

Dont make the same mistake I have :)

CGTalk Moderation
11-11-2010, 02:57 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.